<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"><title>PHPMailer发送邮件(谷歌、163邮箱) | Ahuang'Blog</title><meta name="author" content="Ahuang"><meta name="copyright" content="Ahuang"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="基于PHPMailer三方类库封装的邮件发送的工具类">
<meta property="og:type" content="article">
<meta property="og:title" content="PHPMailer发送邮件(谷歌、163邮箱)">
<meta property="og:url" content="http://huangxiaochang.gitee.io/ahuang_blog/2021/04/12/023/index.html">
<meta property="og:site_name" content="Ahuang&#39;Blog">
<meta property="og:description" content="基于PHPMailer三方类库封装的邮件发送的工具类">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://fastly.jsdelivr.net/gh/jerryc127/CDN@latest/cover/default_bg.png">
<meta property="article:published_time" content="2021-04-12T09:24:09.000Z">
<meta property="article:modified_time" content="2023-02-01T09:55:37.131Z">
<meta property="article:author" content="Ahuang">
<meta property="article:tag" content="邮件发送">
<meta property="article:tag" content="PHPMailer">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://fastly.jsdelivr.net/gh/jerryc127/CDN@latest/cover/default_bg.png"><link rel="shortcut icon" href="/ahuang_blog/img/favicon.ico"><link rel="canonical" href="http://huangxiaochang.gitee.io/ahuang_blog/2021/04/12/023/index.html"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><meta/><link rel="stylesheet" href="/ahuang_blog/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = { 
  root: '/ahuang_blog/',
  algolia: undefined,
  localSearch: {"path":"/ahuang_blog/search.xml","preload":true,"languages":{"hits_empty":"找不到您查询的内容：${query}"}},
  translate: undefined,
  noticeOutdate: {"limitDay":500,"position":"top","messagePrev":"It has been","messageNext":"days since the last update, the content of the article may be outdated."},
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":400},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  source: {
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isAnchor: false,
  percent: {
    toc: true,
    rightside: true,
  }
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: 'PHPMailer发送邮件(谷歌、163邮箱)',
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: false,
  postUpdate: '2023-02-01 17:55:37'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
    win.getCSS = url => new Promise((resolve, reject) => {
      const link = document.createElement('link')
      link.rel = 'stylesheet'
      link.href = url
      link.onload = () => resolve()
      link.onerror = () => reject()
      document.head.appendChild(link)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><link rel="stylesheet" href="/blog/css/transpancy.css"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/js-heo@1.0.11/mainColor/heoMainColor.css"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/js-heo@1.0.11/categoryBar/categoryBar.css"><!-- hexo injector head_end start --><link rel="stylesheet" href="https://npm.elemecdn.com/hexo-butterfly-clock/lib/clock.min.css" /><!-- hexo injector head_end end --><meta name="generator" content="Hexo 6.3.0"></head><body><div id="loading-box"><div class="loading-left-bg"></div><div class="loading-right-bg"></div><div class="spinner-box"><div class="configure-border-1"><div class="configure-core"></div></div><div class="configure-border-2"><div class="configure-core"></div></div><div class="loading-word">加载中...</div></div></div><script>const preloader = {
  endLoading: () => {
    document.body.style.overflow = 'auto';
    document.getElementById('loading-box').classList.add("loaded")
  },
  initLoading: () => {
    document.body.style.overflow = '';
    document.getElementById('loading-box').classList.remove("loaded")

  }
}
window.addEventListener('load',()=> { preloader.endLoading() })

if (false) {
  document.addEventListener('pjax:send', () => { preloader.initLoading() })
  document.addEventListener('pjax:complete', () => { preloader.endLoading() })
}</script><div id="web_bg"></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="/ahuang_blog/img/Misaka.jpg" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/ahuang_blog/archives/"><div class="headline">文章</div><div class="length-num">51</div></a><a href="/ahuang_blog/tags/"><div class="headline">标签</div><div class="length-num">35</div></a><a href="/ahuang_blog/categories/"><div class="headline">分类</div><div class="length-num">8</div></a></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/ahuang_blog/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/ahuang_blog/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/ahuang_blog/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/ahuang_blog/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/ahuang_blog/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg fixed" id="page-header" style="background-image: url('https://fastly.jsdelivr.net/gh/jerryc127/CDN@latest/cover/default_bg.png')"><nav id="nav"><span id="blog-info"><a href="/ahuang_blog/" title="Ahuang'Blog"><span class="site-name">Ahuang'Blog</span></a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search" href="javascript:void(0);"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/ahuang_blog/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/ahuang_blog/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/ahuang_blog/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/ahuang_blog/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/ahuang_blog/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div><div id="toggle-menu"><a class="site-page" href="javascript:void(0);"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">PHPMailer发送邮件(谷歌、163邮箱)</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2021-04-12T09:24:09.000Z" title="发表于 2021-04-12 17:24:09">2021-04-12</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2023-02-01T09:55:37.131Z" title="更新于 2023-02-01 17:55:37">2023-02-01</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/ahuang_blog/categories/PHP/">PHP</a></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-wordcount"><i class="far fa-file-word fa-fw post-meta-icon"></i><span class="post-meta-label">字数总计:</span><span class="word-count">20.9k</span><span class="post-meta-separator">|</span><i class="far fa-clock fa-fw post-meta-icon"></i><span class="post-meta-label">阅读时长:</span><span>128分钟</span></span><span class="post-meta-separator">|</span><span class="post-meta-pv-cv" id="" data-flag-title="PHPMailer发送邮件(谷歌、163邮箱)"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">阅读量:</span><span id="busuanzi_value_page_pv"><i class="fa-solid fa-spinner fa-spin"></i></span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><p>配置参数</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">return</span> [</span><br><span class="line"></span><br><span class="line">    // gmail 邮箱配置</span><br><span class="line">    <span class="string">&#x27;host&#x27;</span>      =&gt;<span class="string">&#x27;ssl://smtp.gmail.com&#x27;</span>, //smtp服务器</span><br><span class="line">    <span class="string">&#x27;send_email&#x27;</span>=&gt;<span class="string">&#x27;xxx@gmail.com&#x27;</span>, //发送者的邮件地址</span><br><span class="line">    <span class="string">&#x27;name&#x27;</span>      =&gt;<span class="string">&#x27;name&#x27;</span>, //发送邮件的用户昵称</span><br><span class="line">    <span class="string">&#x27;username&#x27;</span>  =&gt;<span class="string">&#x27;xxx@gmail.com&#x27;</span>,  //登录到邮箱的用户名</span><br><span class="line">    <span class="string">&#x27;password&#x27;</span>  =&gt; <span class="string">&#x27;xxx&#x27;</span>,  //第三方登录的授权码，在邮箱里面设置</span><br><span class="line">    <span class="string">&#x27;title&#x27;</span>     =&gt;<span class="string">&#x27;谷歌邮箱验证码&#x27;</span>,  //邮件标题</span><br><span class="line">    <span class="string">&#x27;content&#x27;</span>   =&gt; <span class="string">&#x27;您的邮箱验证码是 %s, 10分钟有效时间。&#x27;</span>,  ////邮件正文</span><br><span class="line">    <span class="string">&#x27;port&#x27;</span>      =&gt;  465,  //端口</span><br><span class="line"></span><br><span class="line">];</span><br></pre></td></tr></table></figure>

<p>发送邮件业务处理<br>调用自己封装的业务类<br>这里调用的是谷歌邮箱的验证码发送</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br></pre></td><td class="code"><pre><span class="line">/**</span><br><span class="line"> * 发送邮箱验证码</span><br><span class="line"> * <span class="variable">$email</span>  收件邮箱</span><br><span class="line"> * <span class="variable">$code</span>   验证码</span><br><span class="line"> */</span><br><span class="line">private <span class="keyword">function</span> sendCodeByEmail(<span class="variable">$email</span>, <span class="variable">$code</span>)</span><br><span class="line">&#123;</span><br><span class="line">    <span class="variable">$host</span> = config(<span class="string">&#x27;email.host&#x27;</span>);</span><br><span class="line">    <span class="variable">$from</span> = config(<span class="string">&#x27;email.send_email&#x27;</span>);</span><br><span class="line">    <span class="variable">$fromName</span> = config(<span class="string">&#x27;email.name&#x27;</span>);</span><br><span class="line">    <span class="variable">$username</span> = config(<span class="string">&#x27;email.username&#x27;</span>);</span><br><span class="line">    <span class="variable">$password</span> = config(<span class="string">&#x27;email.password&#x27;</span>);</span><br><span class="line">    <span class="variable">$title</span> = config(<span class="string">&#x27;email.title&#x27;</span>);</span><br><span class="line">    <span class="variable">$content</span> = config(<span class="string">&#x27;email.content&#x27;</span>);</span><br><span class="line">    <span class="variable">$port</span> = config(<span class="string">&#x27;email.port&#x27;</span>);</span><br><span class="line">    //发送邮箱</span><br><span class="line">    <span class="variable">$res</span> = (new \tool\SendEmail())-&gt;setHost(<span class="variable">$host</span>)</span><br><span class="line">        -&gt;setFrom(<span class="variable">$from</span>)</span><br><span class="line">        -&gt;setFromName(<span class="variable">$fromName</span>)</span><br><span class="line">        -&gt;setUsername(<span class="variable">$username</span>)</span><br><span class="line">        -&gt;setPassword(<span class="variable">$password</span>)</span><br><span class="line">        -&gt;setTitle(<span class="variable">$title</span>)</span><br><span class="line">        -&gt;setContent(<span class="variable">$content</span>)</span><br><span class="line">        -&gt;setPort(<span class="variable">$port</span>)</span><br><span class="line">        -&gt;sendEmailByGmail(<span class="variable">$email</span>, <span class="variable">$code</span>);</span><br><span class="line">    <span class="built_in">return</span> <span class="variable">$res</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>



<p>自己基于PHPMailer封装的业务处理类<br>区别与谷歌邮箱与国内邮箱</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br></pre></td><td class="code"><pre><span class="line">&lt;?php</span><br><span class="line">/**</span><br><span class="line"> * 发邮件</span><br><span class="line"> */</span><br><span class="line">namespace tool;</span><br><span class="line"></span><br><span class="line">use phpmailer\PHPMailer;</span><br><span class="line"></span><br><span class="line">class SendEmail</span><br><span class="line">&#123;</span><br><span class="line"></span><br><span class="line">    private  <span class="variable">$host</span>; //smtp服务器</span><br><span class="line">    private  <span class="variable">$from</span>; //发送者的邮件地址</span><br><span class="line">    private  <span class="variable">$fromName</span>; //发送邮件的用户昵称</span><br><span class="line">    private  <span class="variable">$username</span>; //登录到邮箱的用户名</span><br><span class="line">    private  <span class="variable">$password</span>; //第三方登录的授权码，在邮箱里面设置</span><br><span class="line">    private  <span class="variable">$title</span>;  //邮件标题</span><br><span class="line">    private  <span class="variable">$content</span>;  //邮件正文</span><br><span class="line">    private  <span class="variable">$port</span>;   //端口</span><br><span class="line"></span><br><span class="line">    public <span class="keyword">function</span> <span class="function"><span class="title">__construct</span></span>()</span><br><span class="line">    &#123;</span><br><span class="line"></span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * gmail邮箱</span><br><span class="line">     * @param <span class="variable">$email</span></span><br><span class="line">     * @param <span class="variable">$code</span></span><br><span class="line">     * @<span class="built_in">return</span> bool</span><br><span class="line">     * @throws Exception</span><br><span class="line">     */</span><br><span class="line">    public <span class="keyword">function</span> sendEmailByGmail(<span class="variable">$email</span>, <span class="variable">$code</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="variable">$mail</span> = new PHPMailer();</span><br><span class="line">        <span class="variable">$mail</span>-&gt;IsSMTP();                            // 告诉程式要使用SMTP</span><br><span class="line">        <span class="variable">$mail</span>-&gt;SMTPDebug  = 0;                        // 开启 SMTP debug 信息 (测试时使用)// 1 = 错误和消息// 2 = 只有消息</span><br><span class="line">        <span class="variable">$mail</span>-&gt;SMTPAuth   = <span class="literal">true</span>;                    // 开启 SMTP 验证</span><br><span class="line">        <span class="variable">$mail</span>-&gt;SMTPSecure = <span class="string">&quot;ssl&quot;</span>;                    // sets the prefix to the servier</span><br><span class="line">        <span class="variable">$mail</span>-&gt;Host       = <span class="variable">$this</span>-&gt;host;        // sets GMAIL as the SMTP server</span><br><span class="line">        <span class="variable">$mail</span>-&gt;Port       = <span class="variable">$this</span>-&gt;port;                    // <span class="built_in">set</span> the SMTP port <span class="keyword">for</span> the GMAIL server</span><br><span class="line">        <span class="variable">$mail</span>-&gt;Username   = <span class="variable">$this</span>-&gt;username;        // GMAIL用户名</span><br><span class="line">        <span class="variable">$mail</span>-&gt;Password   = <span class="variable">$this</span>-&gt;password;                // GMAIL密码</span><br><span class="line">        <span class="variable">$mail</span>-&gt;CharSet    = <span class="string">&quot;utf-8&quot;</span>;        //加入该行代码可以防止信件内容乱码</span><br><span class="line">        <span class="variable">$mail</span>-&gt;From = <span class="variable">$this</span>-&gt;username;</span><br><span class="line">        <span class="variable">$mail</span>-&gt;FromName = <span class="variable">$this</span>-&gt;fromName;</span><br><span class="line">        // <span class="variable">$mail</span>-&gt;SetFrom(<span class="variable">$this</span>-&gt;username,<span class="variable">$this</span>-&gt;fromName);        //发信人邮件地址及用户名</span><br><span class="line">        <span class="variable">$mail</span>-&gt;Subject    = <span class="variable">$this</span>-&gt;title;//使用<span class="built_in">base64</span>编码是为了防止信件标题乱码</span><br><span class="line">        <span class="variable">$mail</span> -&gt; IsHTML(<span class="literal">true</span>);            //发送的内容使用html编写</span><br><span class="line">        <span class="variable">$mail</span>-&gt;Body = sprintf(<span class="variable">$this</span>-&gt;content, <span class="variable">$code</span>);</span><br><span class="line">        <span class="variable">$mail</span>-&gt;AddAddress(<span class="variable">$email</span>,<span class="variable">$this</span>-&gt;fromName);        //接收者邮件地址及用户名</span><br><span class="line">        <span class="keyword">if</span>(!<span class="variable">$mail</span>-&gt;Send()) &#123;</span><br><span class="line">            <span class="built_in">return</span> <span class="literal">false</span>;</span><br><span class="line">        &#125;<span class="keyword">else</span>&#123;</span><br><span class="line">            <span class="built_in">return</span> <span class="literal">true</span>;</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    </span><br><span class="line"></span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * 163邮箱</span><br><span class="line">     * @param <span class="variable">$email</span></span><br><span class="line">     * @param <span class="variable">$code</span></span><br><span class="line">     * @<span class="built_in">return</span> bool</span><br><span class="line">     * @throws Exception</span><br><span class="line">     */</span><br><span class="line">    public <span class="keyword">function</span> SendEmail(<span class="variable">$email</span>, <span class="variable">$code</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="variable">$mail</span> = new PHPMailer();</span><br><span class="line">        //3.设置属性，告诉我们的服务器，谁跟谁发送邮件</span><br><span class="line">        <span class="variable">$mail</span> -&gt; IsSMTP();            //告诉服务器使用smtp协议发送</span><br><span class="line">        <span class="variable">$mail</span> -&gt; SMTPAuth = <span class="literal">true</span>;        //开启SMTP授权</span><br><span class="line">        <span class="variable">$mail</span> -&gt; Host = <span class="variable">$this</span>-&gt;host;    //告诉我们的服务器使用163的smtp服务器发送</span><br><span class="line">        <span class="variable">$mail</span> -&gt; Port = <span class="variable">$this</span>-&gt;port;    //端口</span><br><span class="line">        <span class="variable">$mail</span> -&gt; From = <span class="variable">$this</span>-&gt;from;    //发送者的邮件地址</span><br><span class="line">        <span class="variable">$mail</span> -&gt; FromName = <span class="variable">$this</span>-&gt;fromName;        //发送邮件的用户昵称</span><br><span class="line">        <span class="variable">$mail</span> -&gt; Username = <span class="variable">$this</span>-&gt;username;        //登录到邮箱的用户名</span><br><span class="line">        <span class="variable">$mail</span> -&gt; Password = <span class="variable">$this</span>-&gt;password;        //第三方登录的授权码，在邮箱里面设置</span><br><span class="line">        //编辑发送的邮件内容</span><br><span class="line">        <span class="variable">$mail</span> -&gt; IsHTML(<span class="literal">true</span>);            //发送的内容使用html编写</span><br><span class="line">        <span class="variable">$mail</span> -&gt; CharSet = <span class="string">&#x27;utf-8&#x27;</span>;        //设置发送内容的编码</span><br><span class="line">        <span class="variable">$mail</span> -&gt; Subject = <span class="variable">$this</span>-&gt;title;//设置邮件的标题</span><br><span class="line">        <span class="variable">$mail</span> -&gt; MsgHTML(sprintf(<span class="variable">$this</span>-&gt;content, <span class="variable">$code</span>));    //发送的邮件内容主体</span><br><span class="line">        <span class="variable">$mail</span> -&gt; AddAddress(<span class="variable">$email</span>);    //收人的邮件地址</span><br><span class="line">        //调用send方法，执行发送</span><br><span class="line">        <span class="variable">$result</span> = <span class="variable">$mail</span> -&gt; Send();</span><br><span class="line">        <span class="keyword">if</span>(<span class="variable">$result</span>)&#123;</span><br><span class="line">            <span class="built_in">return</span> <span class="literal">true</span>;</span><br><span class="line">        &#125;<span class="keyword">else</span>&#123;</span><br><span class="line">//            <span class="built_in">echo</span> <span class="variable">$mail</span> -&gt; ErrorInfo;die; //错误信息</span><br><span class="line">            <span class="built_in">return</span> <span class="literal">false</span>;</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">    public <span class="keyword">function</span> setHost(<span class="variable">$host</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="variable">$this</span>-&gt;host = <span class="variable">$host</span>;</span><br><span class="line">        <span class="built_in">return</span> <span class="variable">$this</span>;</span><br><span class="line">    &#125;</span><br><span class="line">    public <span class="keyword">function</span> setFrom(<span class="variable">$from</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="variable">$this</span>-&gt;from = <span class="variable">$from</span>;</span><br><span class="line">        <span class="built_in">return</span> <span class="variable">$this</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    public <span class="keyword">function</span> setFromName(<span class="variable">$fromName</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="variable">$this</span>-&gt;fromName = <span class="variable">$fromName</span>;</span><br><span class="line">        <span class="built_in">return</span> <span class="variable">$this</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    public <span class="keyword">function</span> setUsername(<span class="variable">$username</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="variable">$this</span>-&gt;username = <span class="variable">$username</span>;</span><br><span class="line">        <span class="built_in">return</span> <span class="variable">$this</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    public <span class="keyword">function</span> setPassword(<span class="variable">$password</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="variable">$this</span>-&gt;password = <span class="variable">$password</span>;</span><br><span class="line">        <span class="built_in">return</span> <span class="variable">$this</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    public <span class="keyword">function</span> setTitle(<span class="variable">$title</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="variable">$this</span>-&gt;title = <span class="variable">$title</span>;</span><br><span class="line">        <span class="built_in">return</span> <span class="variable">$this</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    public <span class="keyword">function</span> setContent(<span class="variable">$content</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="variable">$this</span>-&gt;content = <span class="variable">$content</span>;</span><br><span class="line">        <span class="built_in">return</span> <span class="variable">$this</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    public <span class="keyword">function</span> setPort(<span class="variable">$port</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="variable">$this</span>-&gt;port = <span class="variable">$port</span>;</span><br><span class="line">        <span class="built_in">return</span> <span class="variable">$this</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>




<p>PHPMailer工具类代码附上</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br><span class="line">187</span><br><span class="line">188</span><br><span class="line">189</span><br><span class="line">190</span><br><span class="line">191</span><br><span class="line">192</span><br><span class="line">193</span><br><span class="line">194</span><br><span class="line">195</span><br><span class="line">196</span><br><span class="line">197</span><br><span class="line">198</span><br><span class="line">199</span><br><span class="line">200</span><br><span class="line">201</span><br><span class="line">202</span><br><span class="line">203</span><br><span class="line">204</span><br><span class="line">205</span><br><span class="line">206</span><br><span class="line">207</span><br><span class="line">208</span><br><span class="line">209</span><br><span class="line">210</span><br><span class="line">211</span><br><span class="line">212</span><br><span class="line">213</span><br><span class="line">214</span><br><span class="line">215</span><br><span class="line">216</span><br><span class="line">217</span><br><span class="line">218</span><br><span class="line">219</span><br><span class="line">220</span><br><span class="line">221</span><br><span class="line">222</span><br><span class="line">223</span><br><span class="line">224</span><br><span class="line">225</span><br><span class="line">226</span><br><span class="line">227</span><br><span class="line">228</span><br><span class="line">229</span><br><span class="line">230</span><br><span class="line">231</span><br><span class="line">232</span><br><span class="line">233</span><br><span class="line">234</span><br><span class="line">235</span><br><span class="line">236</span><br><span class="line">237</span><br><span class="line">238</span><br><span class="line">239</span><br><span class="line">240</span><br><span class="line">241</span><br><span class="line">242</span><br><span class="line">243</span><br><span class="line">244</span><br><span class="line">245</span><br><span class="line">246</span><br><span class="line">247</span><br><span class="line">248</span><br><span class="line">249</span><br><span class="line">250</span><br><span class="line">251</span><br><span class="line">252</span><br><span class="line">253</span><br><span class="line">254</span><br><span class="line">255</span><br><span class="line">256</span><br><span class="line">257</span><br><span class="line">258</span><br><span class="line">259</span><br><span class="line">260</span><br><span class="line">261</span><br><span class="line">262</span><br><span class="line">263</span><br><span class="line">264</span><br><span class="line">265</span><br><span class="line">266</span><br><span class="line">267</span><br><span class="line">268</span><br><span class="line">269</span><br><span class="line">270</span><br><span class="line">271</span><br><span class="line">272</span><br><span class="line">273</span><br><span class="line">274</span><br><span class="line">275</span><br><span class="line">276</span><br><span class="line">277</span><br><span class="line">278</span><br><span class="line">279</span><br><span class="line">280</span><br><span class="line">281</span><br><span class="line">282</span><br><span class="line">283</span><br><span class="line">284</span><br><span class="line">285</span><br><span class="line">286</span><br><span class="line">287</span><br><span class="line">288</span><br><span class="line">289</span><br><span class="line">290</span><br><span class="line">291</span><br><span class="line">292</span><br><span class="line">293</span><br><span class="line">294</span><br><span class="line">295</span><br><span class="line">296</span><br><span class="line">297</span><br><span class="line">298</span><br><span class="line">299</span><br><span class="line">300</span><br><span class="line">301</span><br><span class="line">302</span><br><span class="line">303</span><br><span class="line">304</span><br><span class="line">305</span><br><span class="line">306</span><br><span class="line">307</span><br><span class="line">308</span><br><span class="line">309</span><br><span class="line">310</span><br><span class="line">311</span><br><span class="line">312</span><br><span class="line">313</span><br><span class="line">314</span><br><span class="line">315</span><br><span class="line">316</span><br><span class="line">317</span><br><span class="line">318</span><br><span class="line">319</span><br><span class="line">320</span><br><span class="line">321</span><br><span class="line">322</span><br><span class="line">323</span><br><span class="line">324</span><br><span class="line">325</span><br><span class="line">326</span><br><span class="line">327</span><br><span class="line">328</span><br><span class="line">329</span><br><span class="line">330</span><br><span class="line">331</span><br><span class="line">332</span><br><span class="line">333</span><br><span class="line">334</span><br><span class="line">335</span><br><span class="line">336</span><br><span class="line">337</span><br><span class="line">338</span><br><span class="line">339</span><br><span class="line">340</span><br><span class="line">341</span><br><span class="line">342</span><br><span class="line">343</span><br><span class="line">344</span><br><span class="line">345</span><br><span class="line">346</span><br><span class="line">347</span><br><span class="line">348</span><br><span class="line">349</span><br><span class="line">350</span><br><span class="line">351</span><br><span class="line">352</span><br><span class="line">353</span><br><span class="line">354</span><br><span class="line">355</span><br><span class="line">356</span><br><span class="line">357</span><br><span class="line">358</span><br><span class="line">359</span><br><span class="line">360</span><br><span class="line">361</span><br><span class="line">362</span><br><span class="line">363</span><br><span class="line">364</span><br><span class="line">365</span><br><span class="line">366</span><br><span class="line">367</span><br><span class="line">368</span><br><span class="line">369</span><br><span class="line">370</span><br><span class="line">371</span><br><span class="line">372</span><br><span class="line">373</span><br><span class="line">374</span><br><span class="line">375</span><br><span class="line">376</span><br><span class="line">377</span><br><span class="line">378</span><br><span class="line">379</span><br><span class="line">380</span><br><span class="line">381</span><br><span class="line">382</span><br><span class="line">383</span><br><span class="line">384</span><br><span class="line">385</span><br><span class="line">386</span><br><span class="line">387</span><br><span class="line">388</span><br><span class="line">389</span><br><span class="line">390</span><br><span class="line">391</span><br><span class="line">392</span><br><span class="line">393</span><br><span class="line">394</span><br><span class="line">395</span><br><span class="line">396</span><br><span class="line">397</span><br><span class="line">398</span><br><span class="line">399</span><br><span class="line">400</span><br><span class="line">401</span><br><span class="line">402</span><br><span class="line">403</span><br><span class="line">404</span><br><span class="line">405</span><br><span class="line">406</span><br><span class="line">407</span><br><span class="line">408</span><br><span class="line">409</span><br><span class="line">410</span><br><span class="line">411</span><br><span class="line">412</span><br><span class="line">413</span><br><span class="line">414</span><br><span class="line">415</span><br><span class="line">416</span><br><span class="line">417</span><br><span class="line">418</span><br><span class="line">419</span><br><span class="line">420</span><br><span class="line">421</span><br><span class="line">422</span><br><span class="line">423</span><br><span class="line">424</span><br><span class="line">425</span><br><span class="line">426</span><br><span class="line">427</span><br><span class="line">428</span><br><span class="line">429</span><br><span class="line">430</span><br><span class="line">431</span><br><span class="line">432</span><br><span class="line">433</span><br><span class="line">434</span><br><span class="line">435</span><br><span class="line">436</span><br><span class="line">437</span><br><span class="line">438</span><br><span class="line">439</span><br><span class="line">440</span><br><span class="line">441</span><br><span class="line">442</span><br><span class="line">443</span><br><span class="line">444</span><br><span class="line">445</span><br><span class="line">446</span><br><span class="line">447</span><br><span class="line">448</span><br><span class="line">449</span><br><span class="line">450</span><br><span class="line">451</span><br><span class="line">452</span><br><span class="line">453</span><br><span class="line">454</span><br><span class="line">455</span><br><span class="line">456</span><br><span class="line">457</span><br><span class="line">458</span><br><span class="line">459</span><br><span class="line">460</span><br><span class="line">461</span><br><span class="line">462</span><br><span class="line">463</span><br><span class="line">464</span><br><span class="line">465</span><br><span class="line">466</span><br><span class="line">467</span><br><span class="line">468</span><br><span class="line">469</span><br><span class="line">470</span><br><span class="line">471</span><br><span class="line">472</span><br><span class="line">473</span><br><span class="line">474</span><br><span class="line">475</span><br><span class="line">476</span><br><span class="line">477</span><br><span class="line">478</span><br><span class="line">479</span><br><span class="line">480</span><br><span class="line">481</span><br><span class="line">482</span><br><span class="line">483</span><br><span class="line">484</span><br><span class="line">485</span><br><span class="line">486</span><br><span class="line">487</span><br><span class="line">488</span><br><span class="line">489</span><br><span class="line">490</span><br><span class="line">491</span><br><span class="line">492</span><br><span class="line">493</span><br><span class="line">494</span><br><span class="line">495</span><br><span class="line">496</span><br><span class="line">497</span><br><span class="line">498</span><br><span class="line">499</span><br><span class="line">500</span><br><span class="line">501</span><br><span class="line">502</span><br><span class="line">503</span><br><span class="line">504</span><br><span class="line">505</span><br><span class="line">506</span><br><span class="line">507</span><br><span class="line">508</span><br><span class="line">509</span><br><span class="line">510</span><br><span class="line">511</span><br><span class="line">512</span><br><span class="line">513</span><br><span class="line">514</span><br><span class="line">515</span><br><span class="line">516</span><br><span class="line">517</span><br><span class="line">518</span><br><span class="line">519</span><br><span class="line">520</span><br><span class="line">521</span><br><span class="line">522</span><br><span class="line">523</span><br><span class="line">524</span><br><span class="line">525</span><br><span class="line">526</span><br><span class="line">527</span><br><span class="line">528</span><br><span class="line">529</span><br><span class="line">530</span><br><span class="line">531</span><br><span class="line">532</span><br><span class="line">533</span><br><span class="line">534</span><br><span class="line">535</span><br><span class="line">536</span><br><span class="line">537</span><br><span class="line">538</span><br><span class="line">539</span><br><span class="line">540</span><br><span class="line">541</span><br><span class="line">542</span><br><span class="line">543</span><br><span class="line">544</span><br><span class="line">545</span><br><span class="line">546</span><br><span class="line">547</span><br><span class="line">548</span><br><span class="line">549</span><br><span class="line">550</span><br><span class="line">551</span><br><span class="line">552</span><br><span class="line">553</span><br><span class="line">554</span><br><span class="line">555</span><br><span class="line">556</span><br><span class="line">557</span><br><span class="line">558</span><br><span class="line">559</span><br><span class="line">560</span><br><span class="line">561</span><br><span class="line">562</span><br><span class="line">563</span><br><span class="line">564</span><br><span class="line">565</span><br><span class="line">566</span><br><span class="line">567</span><br><span class="line">568</span><br><span class="line">569</span><br><span class="line">570</span><br><span class="line">571</span><br><span class="line">572</span><br><span class="line">573</span><br><span class="line">574</span><br><span class="line">575</span><br><span class="line">576</span><br><span class="line">577</span><br><span class="line">578</span><br><span class="line">579</span><br><span class="line">580</span><br><span class="line">581</span><br><span class="line">582</span><br><span class="line">583</span><br><span class="line">584</span><br><span class="line">585</span><br><span class="line">586</span><br><span class="line">587</span><br><span class="line">588</span><br><span class="line">589</span><br><span class="line">590</span><br><span class="line">591</span><br><span class="line">592</span><br><span class="line">593</span><br><span class="line">594</span><br><span class="line">595</span><br><span class="line">596</span><br><span class="line">597</span><br><span class="line">598</span><br><span class="line">599</span><br><span class="line">600</span><br><span class="line">601</span><br><span class="line">602</span><br><span class="line">603</span><br><span class="line">604</span><br><span class="line">605</span><br><span class="line">606</span><br><span class="line">607</span><br><span class="line">608</span><br><span class="line">609</span><br><span class="line">610</span><br><span class="line">611</span><br><span class="line">612</span><br><span class="line">613</span><br><span class="line">614</span><br><span class="line">615</span><br><span class="line">616</span><br><span class="line">617</span><br><span class="line">618</span><br><span class="line">619</span><br><span class="line">620</span><br><span class="line">621</span><br><span class="line">622</span><br><span class="line">623</span><br><span class="line">624</span><br><span class="line">625</span><br><span class="line">626</span><br><span class="line">627</span><br><span class="line">628</span><br><span class="line">629</span><br><span class="line">630</span><br><span class="line">631</span><br><span class="line">632</span><br><span class="line">633</span><br><span class="line">634</span><br><span class="line">635</span><br><span class="line">636</span><br><span class="line">637</span><br><span class="line">638</span><br><span class="line">639</span><br><span class="line">640</span><br><span class="line">641</span><br><span class="line">642</span><br><span class="line">643</span><br><span class="line">644</span><br><span class="line">645</span><br><span class="line">646</span><br><span class="line">647</span><br><span class="line">648</span><br><span class="line">649</span><br><span class="line">650</span><br><span class="line">651</span><br><span class="line">652</span><br><span class="line">653</span><br><span class="line">654</span><br><span class="line">655</span><br><span class="line">656</span><br><span class="line">657</span><br><span class="line">658</span><br><span class="line">659</span><br><span class="line">660</span><br><span class="line">661</span><br><span class="line">662</span><br><span class="line">663</span><br><span class="line">664</span><br><span class="line">665</span><br><span class="line">666</span><br><span class="line">667</span><br><span class="line">668</span><br><span class="line">669</span><br><span class="line">670</span><br><span class="line">671</span><br><span class="line">672</span><br><span class="line">673</span><br><span class="line">674</span><br><span class="line">675</span><br><span class="line">676</span><br><span class="line">677</span><br><span class="line">678</span><br><span class="line">679</span><br><span class="line">680</span><br><span class="line">681</span><br><span class="line">682</span><br><span class="line">683</span><br><span class="line">684</span><br><span class="line">685</span><br><span class="line">686</span><br><span class="line">687</span><br><span class="line">688</span><br><span class="line">689</span><br><span class="line">690</span><br><span class="line">691</span><br><span class="line">692</span><br><span class="line">693</span><br><span class="line">694</span><br><span class="line">695</span><br><span class="line">696</span><br><span class="line">697</span><br><span class="line">698</span><br><span class="line">699</span><br><span class="line">700</span><br><span class="line">701</span><br><span class="line">702</span><br><span class="line">703</span><br><span class="line">704</span><br><span class="line">705</span><br><span class="line">706</span><br><span class="line">707</span><br><span class="line">708</span><br><span class="line">709</span><br><span class="line">710</span><br><span class="line">711</span><br><span class="line">712</span><br><span class="line">713</span><br><span class="line">714</span><br><span class="line">715</span><br><span class="line">716</span><br><span class="line">717</span><br><span class="line">718</span><br><span class="line">719</span><br><span class="line">720</span><br><span class="line">721</span><br><span class="line">722</span><br><span class="line">723</span><br><span class="line">724</span><br><span class="line">725</span><br><span class="line">726</span><br><span class="line">727</span><br><span class="line">728</span><br><span class="line">729</span><br><span class="line">730</span><br><span class="line">731</span><br><span class="line">732</span><br><span class="line">733</span><br><span class="line">734</span><br><span class="line">735</span><br><span class="line">736</span><br><span class="line">737</span><br><span class="line">738</span><br><span class="line">739</span><br><span class="line">740</span><br><span class="line">741</span><br><span class="line">742</span><br><span class="line">743</span><br><span class="line">744</span><br><span class="line">745</span><br><span class="line">746</span><br><span class="line">747</span><br><span class="line">748</span><br><span class="line">749</span><br><span class="line">750</span><br><span class="line">751</span><br><span class="line">752</span><br><span class="line">753</span><br><span class="line">754</span><br><span class="line">755</span><br><span class="line">756</span><br><span class="line">757</span><br><span class="line">758</span><br><span class="line">759</span><br><span class="line">760</span><br><span class="line">761</span><br><span class="line">762</span><br><span class="line">763</span><br><span class="line">764</span><br><span class="line">765</span><br><span class="line">766</span><br><span class="line">767</span><br><span class="line">768</span><br><span class="line">769</span><br><span class="line">770</span><br><span class="line">771</span><br><span class="line">772</span><br><span class="line">773</span><br><span class="line">774</span><br><span class="line">775</span><br><span class="line">776</span><br><span class="line">777</span><br><span class="line">778</span><br><span class="line">779</span><br><span class="line">780</span><br><span class="line">781</span><br><span class="line">782</span><br><span class="line">783</span><br><span class="line">784</span><br><span class="line">785</span><br><span class="line">786</span><br><span class="line">787</span><br><span class="line">788</span><br><span class="line">789</span><br><span class="line">790</span><br><span class="line">791</span><br><span class="line">792</span><br><span class="line">793</span><br><span class="line">794</span><br><span class="line">795</span><br><span class="line">796</span><br><span class="line">797</span><br><span class="line">798</span><br><span class="line">799</span><br><span class="line">800</span><br><span class="line">801</span><br><span class="line">802</span><br><span class="line">803</span><br><span class="line">804</span><br><span class="line">805</span><br><span class="line">806</span><br><span class="line">807</span><br><span class="line">808</span><br><span class="line">809</span><br><span class="line">810</span><br><span class="line">811</span><br><span class="line">812</span><br><span class="line">813</span><br><span class="line">814</span><br><span class="line">815</span><br><span class="line">816</span><br><span class="line">817</span><br><span class="line">818</span><br><span class="line">819</span><br><span class="line">820</span><br><span class="line">821</span><br><span class="line">822</span><br><span class="line">823</span><br><span class="line">824</span><br><span class="line">825</span><br><span class="line">826</span><br><span class="line">827</span><br><span class="line">828</span><br><span class="line">829</span><br><span class="line">830</span><br><span class="line">831</span><br><span class="line">832</span><br><span class="line">833</span><br><span class="line">834</span><br><span class="line">835</span><br><span class="line">836</span><br><span class="line">837</span><br><span class="line">838</span><br><span class="line">839</span><br><span class="line">840</span><br><span class="line">841</span><br><span class="line">842</span><br><span class="line">843</span><br><span class="line">844</span><br><span class="line">845</span><br><span class="line">846</span><br><span class="line">847</span><br><span class="line">848</span><br><span class="line">849</span><br><span class="line">850</span><br><span class="line">851</span><br><span class="line">852</span><br><span class="line">853</span><br><span class="line">854</span><br><span class="line">855</span><br><span class="line">856</span><br><span class="line">857</span><br><span class="line">858</span><br><span class="line">859</span><br><span class="line">860</span><br><span class="line">861</span><br><span class="line">862</span><br><span class="line">863</span><br><span class="line">864</span><br><span class="line">865</span><br><span class="line">866</span><br><span class="line">867</span><br><span class="line">868</span><br><span class="line">869</span><br><span class="line">870</span><br><span class="line">871</span><br><span class="line">872</span><br><span class="line">873</span><br><span class="line">874</span><br><span class="line">875</span><br><span class="line">876</span><br><span class="line">877</span><br><span class="line">878</span><br><span class="line">879</span><br><span class="line">880</span><br><span class="line">881</span><br><span class="line">882</span><br><span class="line">883</span><br><span class="line">884</span><br><span class="line">885</span><br><span class="line">886</span><br><span class="line">887</span><br><span class="line">888</span><br><span class="line">889</span><br><span class="line">890</span><br><span class="line">891</span><br><span class="line">892</span><br><span class="line">893</span><br><span class="line">894</span><br><span class="line">895</span><br><span class="line">896</span><br><span class="line">897</span><br><span class="line">898</span><br><span class="line">899</span><br><span class="line">900</span><br><span class="line">901</span><br><span class="line">902</span><br><span class="line">903</span><br><span class="line">904</span><br><span class="line">905</span><br><span class="line">906</span><br><span class="line">907</span><br><span class="line">908</span><br><span class="line">909</span><br><span class="line">910</span><br><span class="line">911</span><br><span class="line">912</span><br><span class="line">913</span><br><span class="line">914</span><br><span class="line">915</span><br><span class="line">916</span><br><span class="line">917</span><br><span class="line">918</span><br><span class="line">919</span><br><span class="line">920</span><br><span class="line">921</span><br><span class="line">922</span><br><span class="line">923</span><br><span class="line">924</span><br><span class="line">925</span><br><span class="line">926</span><br><span class="line">927</span><br><span class="line">928</span><br><span class="line">929</span><br><span class="line">930</span><br><span class="line">931</span><br><span class="line">932</span><br><span class="line">933</span><br><span class="line">934</span><br><span class="line">935</span><br><span class="line">936</span><br><span class="line">937</span><br><span class="line">938</span><br><span class="line">939</span><br><span class="line">940</span><br><span class="line">941</span><br><span class="line">942</span><br><span class="line">943</span><br><span class="line">944</span><br><span class="line">945</span><br><span class="line">946</span><br><span class="line">947</span><br><span class="line">948</span><br><span class="line">949</span><br><span class="line">950</span><br><span class="line">951</span><br><span class="line">952</span><br><span class="line">953</span><br><span class="line">954</span><br><span class="line">955</span><br><span class="line">956</span><br><span class="line">957</span><br><span class="line">958</span><br><span class="line">959</span><br><span class="line">960</span><br><span class="line">961</span><br><span class="line">962</span><br><span class="line">963</span><br><span class="line">964</span><br><span class="line">965</span><br><span class="line">966</span><br><span class="line">967</span><br><span class="line">968</span><br><span class="line">969</span><br><span class="line">970</span><br><span class="line">971</span><br><span class="line">972</span><br><span class="line">973</span><br><span class="line">974</span><br><span class="line">975</span><br><span class="line">976</span><br><span class="line">977</span><br><span class="line">978</span><br><span class="line">979</span><br><span class="line">980</span><br><span class="line">981</span><br><span class="line">982</span><br><span class="line">983</span><br><span class="line">984</span><br><span class="line">985</span><br><span class="line">986</span><br><span class="line">987</span><br><span class="line">988</span><br><span class="line">989</span><br><span class="line">990</span><br><span class="line">991</span><br><span class="line">992</span><br><span class="line">993</span><br><span class="line">994</span><br><span class="line">995</span><br><span class="line">996</span><br><span class="line">997</span><br><span class="line">998</span><br><span class="line">999</span><br><span class="line">1000</span><br><span class="line">1001</span><br><span class="line">1002</span><br><span class="line">1003</span><br><span class="line">1004</span><br><span class="line">1005</span><br><span class="line">1006</span><br><span class="line">1007</span><br><span class="line">1008</span><br><span class="line">1009</span><br><span class="line">1010</span><br><span class="line">1011</span><br><span class="line">1012</span><br><span class="line">1013</span><br><span class="line">1014</span><br><span class="line">1015</span><br><span class="line">1016</span><br><span class="line">1017</span><br><span class="line">1018</span><br><span class="line">1019</span><br><span class="line">1020</span><br><span class="line">1021</span><br><span class="line">1022</span><br><span class="line">1023</span><br><span class="line">1024</span><br><span class="line">1025</span><br><span class="line">1026</span><br><span class="line">1027</span><br><span class="line">1028</span><br><span class="line">1029</span><br><span class="line">1030</span><br><span class="line">1031</span><br><span class="line">1032</span><br><span class="line">1033</span><br><span class="line">1034</span><br><span class="line">1035</span><br><span class="line">1036</span><br><span class="line">1037</span><br><span class="line">1038</span><br><span class="line">1039</span><br><span class="line">1040</span><br><span class="line">1041</span><br><span class="line">1042</span><br><span class="line">1043</span><br><span class="line">1044</span><br><span class="line">1045</span><br><span class="line">1046</span><br><span class="line">1047</span><br><span class="line">1048</span><br><span class="line">1049</span><br><span class="line">1050</span><br><span class="line">1051</span><br><span class="line">1052</span><br><span class="line">1053</span><br><span class="line">1054</span><br><span class="line">1055</span><br><span class="line">1056</span><br><span class="line">1057</span><br><span class="line">1058</span><br><span class="line">1059</span><br><span class="line">1060</span><br><span class="line">1061</span><br><span class="line">1062</span><br><span class="line">1063</span><br><span class="line">1064</span><br><span class="line">1065</span><br><span class="line">1066</span><br><span class="line">1067</span><br><span class="line">1068</span><br><span class="line">1069</span><br><span class="line">1070</span><br><span class="line">1071</span><br><span class="line">1072</span><br><span class="line">1073</span><br><span class="line">1074</span><br><span class="line">1075</span><br><span class="line">1076</span><br><span class="line">1077</span><br><span class="line">1078</span><br><span class="line">1079</span><br><span class="line">1080</span><br><span class="line">1081</span><br><span class="line">1082</span><br><span class="line">1083</span><br><span class="line">1084</span><br><span class="line">1085</span><br><span class="line">1086</span><br><span class="line">1087</span><br><span class="line">1088</span><br><span class="line">1089</span><br><span class="line">1090</span><br><span class="line">1091</span><br><span class="line">1092</span><br><span class="line">1093</span><br><span class="line">1094</span><br><span class="line">1095</span><br><span class="line">1096</span><br><span class="line">1097</span><br><span class="line">1098</span><br><span class="line">1099</span><br><span class="line">1100</span><br><span class="line">1101</span><br><span class="line">1102</span><br><span class="line">1103</span><br><span class="line">1104</span><br><span class="line">1105</span><br><span class="line">1106</span><br><span class="line">1107</span><br><span class="line">1108</span><br><span class="line">1109</span><br><span class="line">1110</span><br><span class="line">1111</span><br><span class="line">1112</span><br><span class="line">1113</span><br><span class="line">1114</span><br><span class="line">1115</span><br><span class="line">1116</span><br><span class="line">1117</span><br><span class="line">1118</span><br><span class="line">1119</span><br><span class="line">1120</span><br><span class="line">1121</span><br><span class="line">1122</span><br><span class="line">1123</span><br><span class="line">1124</span><br><span class="line">1125</span><br><span class="line">1126</span><br><span class="line">1127</span><br><span class="line">1128</span><br><span class="line">1129</span><br><span class="line">1130</span><br><span class="line">1131</span><br><span class="line">1132</span><br><span class="line">1133</span><br><span class="line">1134</span><br><span class="line">1135</span><br><span class="line">1136</span><br><span class="line">1137</span><br><span class="line">1138</span><br><span class="line">1139</span><br><span class="line">1140</span><br><span class="line">1141</span><br><span class="line">1142</span><br><span class="line">1143</span><br><span class="line">1144</span><br><span class="line">1145</span><br><span class="line">1146</span><br><span class="line">1147</span><br><span class="line">1148</span><br><span class="line">1149</span><br><span class="line">1150</span><br><span class="line">1151</span><br><span class="line">1152</span><br><span class="line">1153</span><br><span class="line">1154</span><br><span class="line">1155</span><br><span class="line">1156</span><br><span class="line">1157</span><br><span class="line">1158</span><br><span class="line">1159</span><br><span class="line">1160</span><br><span class="line">1161</span><br><span class="line">1162</span><br><span class="line">1163</span><br><span class="line">1164</span><br><span class="line">1165</span><br><span class="line">1166</span><br><span class="line">1167</span><br><span class="line">1168</span><br><span class="line">1169</span><br><span class="line">1170</span><br><span class="line">1171</span><br><span class="line">1172</span><br><span class="line">1173</span><br><span class="line">1174</span><br><span class="line">1175</span><br><span class="line">1176</span><br><span class="line">1177</span><br><span class="line">1178</span><br><span class="line">1179</span><br><span class="line">1180</span><br><span class="line">1181</span><br><span class="line">1182</span><br><span class="line">1183</span><br><span class="line">1184</span><br><span class="line">1185</span><br><span class="line">1186</span><br><span class="line">1187</span><br><span class="line">1188</span><br><span class="line">1189</span><br><span class="line">1190</span><br><span class="line">1191</span><br><span class="line">1192</span><br><span class="line">1193</span><br><span class="line">1194</span><br><span class="line">1195</span><br><span class="line">1196</span><br><span class="line">1197</span><br><span class="line">1198</span><br><span class="line">1199</span><br><span class="line">1200</span><br><span class="line">1201</span><br><span class="line">1202</span><br><span class="line">1203</span><br><span class="line">1204</span><br><span class="line">1205</span><br><span class="line">1206</span><br><span class="line">1207</span><br><span class="line">1208</span><br><span class="line">1209</span><br><span class="line">1210</span><br><span class="line">1211</span><br><span class="line">1212</span><br><span class="line">1213</span><br><span class="line">1214</span><br><span class="line">1215</span><br><span class="line">1216</span><br><span class="line">1217</span><br><span class="line">1218</span><br><span class="line">1219</span><br><span class="line">1220</span><br><span class="line">1221</span><br><span class="line">1222</span><br><span class="line">1223</span><br><span class="line">1224</span><br><span class="line">1225</span><br><span class="line">1226</span><br><span class="line">1227</span><br><span class="line">1228</span><br><span class="line">1229</span><br><span class="line">1230</span><br><span class="line">1231</span><br><span class="line">1232</span><br><span class="line">1233</span><br><span class="line">1234</span><br><span class="line">1235</span><br><span class="line">1236</span><br><span class="line">1237</span><br><span class="line">1238</span><br><span class="line">1239</span><br><span class="line">1240</span><br><span class="line">1241</span><br><span class="line">1242</span><br><span class="line">1243</span><br><span class="line">1244</span><br><span class="line">1245</span><br><span class="line">1246</span><br><span class="line">1247</span><br><span class="line">1248</span><br><span class="line">1249</span><br><span class="line">1250</span><br><span class="line">1251</span><br><span class="line">1252</span><br><span class="line">1253</span><br><span class="line">1254</span><br><span class="line">1255</span><br><span class="line">1256</span><br><span class="line">1257</span><br><span class="line">1258</span><br><span class="line">1259</span><br><span class="line">1260</span><br><span class="line">1261</span><br><span class="line">1262</span><br><span class="line">1263</span><br><span class="line">1264</span><br><span class="line">1265</span><br><span class="line">1266</span><br><span class="line">1267</span><br><span class="line">1268</span><br><span class="line">1269</span><br><span class="line">1270</span><br><span class="line">1271</span><br><span class="line">1272</span><br><span class="line">1273</span><br><span class="line">1274</span><br><span class="line">1275</span><br><span class="line">1276</span><br><span class="line">1277</span><br><span class="line">1278</span><br><span class="line">1279</span><br><span class="line">1280</span><br><span class="line">1281</span><br><span class="line">1282</span><br><span class="line">1283</span><br><span class="line">1284</span><br><span class="line">1285</span><br><span class="line">1286</span><br><span class="line">1287</span><br><span class="line">1288</span><br><span class="line">1289</span><br><span class="line">1290</span><br><span class="line">1291</span><br><span class="line">1292</span><br><span class="line">1293</span><br><span class="line">1294</span><br><span class="line">1295</span><br><span class="line">1296</span><br><span class="line">1297</span><br><span class="line">1298</span><br><span class="line">1299</span><br><span class="line">1300</span><br><span class="line">1301</span><br><span class="line">1302</span><br><span class="line">1303</span><br><span class="line">1304</span><br><span class="line">1305</span><br><span class="line">1306</span><br><span class="line">1307</span><br><span class="line">1308</span><br><span class="line">1309</span><br><span class="line">1310</span><br><span class="line">1311</span><br><span class="line">1312</span><br><span class="line">1313</span><br><span class="line">1314</span><br><span class="line">1315</span><br><span class="line">1316</span><br><span class="line">1317</span><br><span class="line">1318</span><br><span class="line">1319</span><br><span class="line">1320</span><br><span class="line">1321</span><br><span class="line">1322</span><br><span class="line">1323</span><br><span class="line">1324</span><br><span class="line">1325</span><br><span class="line">1326</span><br><span class="line">1327</span><br><span class="line">1328</span><br><span class="line">1329</span><br><span class="line">1330</span><br><span class="line">1331</span><br><span class="line">1332</span><br><span class="line">1333</span><br><span class="line">1334</span><br><span class="line">1335</span><br><span class="line">1336</span><br><span class="line">1337</span><br><span class="line">1338</span><br><span class="line">1339</span><br><span class="line">1340</span><br><span class="line">1341</span><br><span class="line">1342</span><br><span class="line">1343</span><br><span class="line">1344</span><br><span class="line">1345</span><br><span class="line">1346</span><br><span class="line">1347</span><br><span class="line">1348</span><br><span class="line">1349</span><br><span class="line">1350</span><br><span class="line">1351</span><br><span class="line">1352</span><br><span class="line">1353</span><br><span class="line">1354</span><br><span class="line">1355</span><br><span class="line">1356</span><br><span class="line">1357</span><br><span class="line">1358</span><br><span class="line">1359</span><br><span class="line">1360</span><br><span class="line">1361</span><br><span class="line">1362</span><br><span class="line">1363</span><br><span class="line">1364</span><br><span class="line">1365</span><br><span class="line">1366</span><br><span class="line">1367</span><br><span class="line">1368</span><br><span class="line">1369</span><br><span class="line">1370</span><br><span class="line">1371</span><br><span class="line">1372</span><br><span class="line">1373</span><br><span class="line">1374</span><br><span class="line">1375</span><br><span class="line">1376</span><br><span class="line">1377</span><br><span class="line">1378</span><br><span class="line">1379</span><br><span class="line">1380</span><br><span class="line">1381</span><br><span class="line">1382</span><br><span class="line">1383</span><br><span class="line">1384</span><br><span class="line">1385</span><br><span class="line">1386</span><br><span class="line">1387</span><br><span class="line">1388</span><br><span class="line">1389</span><br><span class="line">1390</span><br><span class="line">1391</span><br><span class="line">1392</span><br><span class="line">1393</span><br><span class="line">1394</span><br><span class="line">1395</span><br><span class="line">1396</span><br><span class="line">1397</span><br><span class="line">1398</span><br><span class="line">1399</span><br><span class="line">1400</span><br><span class="line">1401</span><br><span class="line">1402</span><br><span class="line">1403</span><br><span class="line">1404</span><br><span class="line">1405</span><br><span class="line">1406</span><br><span class="line">1407</span><br><span class="line">1408</span><br><span class="line">1409</span><br><span class="line">1410</span><br><span class="line">1411</span><br><span class="line">1412</span><br><span class="line">1413</span><br><span class="line">1414</span><br><span class="line">1415</span><br><span class="line">1416</span><br><span class="line">1417</span><br><span class="line">1418</span><br><span class="line">1419</span><br><span class="line">1420</span><br><span class="line">1421</span><br><span class="line">1422</span><br><span class="line">1423</span><br><span class="line">1424</span><br><span class="line">1425</span><br><span class="line">1426</span><br><span class="line">1427</span><br><span class="line">1428</span><br><span class="line">1429</span><br><span class="line">1430</span><br><span class="line">1431</span><br><span class="line">1432</span><br><span class="line">1433</span><br><span class="line">1434</span><br><span class="line">1435</span><br><span class="line">1436</span><br><span class="line">1437</span><br><span class="line">1438</span><br><span class="line">1439</span><br><span class="line">1440</span><br><span class="line">1441</span><br><span class="line">1442</span><br><span class="line">1443</span><br><span class="line">1444</span><br><span class="line">1445</span><br><span class="line">1446</span><br><span class="line">1447</span><br><span class="line">1448</span><br><span class="line">1449</span><br><span class="line">1450</span><br><span class="line">1451</span><br><span class="line">1452</span><br><span class="line">1453</span><br><span class="line">1454</span><br><span class="line">1455</span><br><span class="line">1456</span><br><span class="line">1457</span><br><span class="line">1458</span><br><span class="line">1459</span><br><span class="line">1460</span><br><span class="line">1461</span><br><span class="line">1462</span><br><span class="line">1463</span><br><span class="line">1464</span><br><span class="line">1465</span><br><span class="line">1466</span><br><span class="line">1467</span><br><span class="line">1468</span><br><span class="line">1469</span><br><span class="line">1470</span><br><span class="line">1471</span><br><span class="line">1472</span><br><span class="line">1473</span><br><span class="line">1474</span><br><span class="line">1475</span><br><span class="line">1476</span><br><span class="line">1477</span><br><span class="line">1478</span><br><span class="line">1479</span><br><span class="line">1480</span><br><span class="line">1481</span><br><span class="line">1482</span><br><span class="line">1483</span><br><span class="line">1484</span><br><span class="line">1485</span><br><span class="line">1486</span><br><span class="line">1487</span><br><span class="line">1488</span><br><span class="line">1489</span><br><span class="line">1490</span><br><span class="line">1491</span><br><span class="line">1492</span><br><span class="line">1493</span><br><span class="line">1494</span><br><span class="line">1495</span><br><span class="line">1496</span><br><span class="line">1497</span><br><span class="line">1498</span><br><span class="line">1499</span><br><span class="line">1500</span><br><span class="line">1501</span><br><span class="line">1502</span><br><span class="line">1503</span><br><span class="line">1504</span><br><span class="line">1505</span><br><span class="line">1506</span><br><span class="line">1507</span><br><span class="line">1508</span><br><span class="line">1509</span><br><span class="line">1510</span><br><span class="line">1511</span><br><span class="line">1512</span><br><span class="line">1513</span><br><span class="line">1514</span><br><span class="line">1515</span><br><span class="line">1516</span><br><span class="line">1517</span><br><span class="line">1518</span><br><span class="line">1519</span><br><span class="line">1520</span><br><span class="line">1521</span><br><span class="line">1522</span><br><span class="line">1523</span><br><span class="line">1524</span><br><span class="line">1525</span><br><span class="line">1526</span><br><span class="line">1527</span><br><span class="line">1528</span><br><span class="line">1529</span><br><span class="line">1530</span><br><span class="line">1531</span><br><span class="line">1532</span><br><span class="line">1533</span><br><span class="line">1534</span><br><span class="line">1535</span><br><span class="line">1536</span><br><span class="line">1537</span><br><span class="line">1538</span><br><span class="line">1539</span><br><span class="line">1540</span><br><span class="line">1541</span><br><span class="line">1542</span><br><span class="line">1543</span><br><span class="line">1544</span><br><span class="line">1545</span><br><span class="line">1546</span><br><span class="line">1547</span><br><span class="line">1548</span><br><span class="line">1549</span><br><span class="line">1550</span><br><span class="line">1551</span><br><span class="line">1552</span><br><span class="line">1553</span><br><span class="line">1554</span><br><span class="line">1555</span><br><span class="line">1556</span><br><span class="line">1557</span><br><span class="line">1558</span><br><span class="line">1559</span><br><span class="line">1560</span><br><span class="line">1561</span><br><span class="line">1562</span><br><span class="line">1563</span><br><span class="line">1564</span><br><span class="line">1565</span><br><span class="line">1566</span><br><span class="line">1567</span><br><span class="line">1568</span><br><span class="line">1569</span><br><span class="line">1570</span><br><span class="line">1571</span><br><span class="line">1572</span><br><span class="line">1573</span><br><span class="line">1574</span><br><span class="line">1575</span><br><span class="line">1576</span><br><span class="line">1577</span><br><span class="line">1578</span><br><span class="line">1579</span><br><span class="line">1580</span><br><span class="line">1581</span><br><span class="line">1582</span><br><span class="line">1583</span><br><span class="line">1584</span><br><span class="line">1585</span><br><span class="line">1586</span><br><span class="line">1587</span><br><span class="line">1588</span><br><span class="line">1589</span><br><span class="line">1590</span><br><span class="line">1591</span><br><span class="line">1592</span><br><span class="line">1593</span><br><span class="line">1594</span><br><span class="line">1595</span><br><span class="line">1596</span><br><span class="line">1597</span><br><span class="line">1598</span><br><span class="line">1599</span><br><span class="line">1600</span><br><span class="line">1601</span><br><span class="line">1602</span><br><span class="line">1603</span><br><span class="line">1604</span><br><span class="line">1605</span><br><span class="line">1606</span><br><span class="line">1607</span><br><span class="line">1608</span><br><span class="line">1609</span><br><span class="line">1610</span><br><span class="line">1611</span><br><span class="line">1612</span><br><span class="line">1613</span><br><span class="line">1614</span><br><span class="line">1615</span><br><span class="line">1616</span><br><span class="line">1617</span><br><span class="line">1618</span><br><span class="line">1619</span><br><span class="line">1620</span><br><span class="line">1621</span><br><span class="line">1622</span><br><span class="line">1623</span><br><span class="line">1624</span><br><span class="line">1625</span><br><span class="line">1626</span><br><span class="line">1627</span><br><span class="line">1628</span><br><span class="line">1629</span><br><span class="line">1630</span><br><span class="line">1631</span><br><span class="line">1632</span><br><span class="line">1633</span><br><span class="line">1634</span><br><span class="line">1635</span><br><span class="line">1636</span><br><span class="line">1637</span><br><span class="line">1638</span><br><span class="line">1639</span><br><span class="line">1640</span><br><span class="line">1641</span><br><span class="line">1642</span><br><span class="line">1643</span><br><span class="line">1644</span><br><span class="line">1645</span><br><span class="line">1646</span><br><span class="line">1647</span><br><span class="line">1648</span><br><span class="line">1649</span><br><span class="line">1650</span><br><span class="line">1651</span><br><span class="line">1652</span><br><span class="line">1653</span><br><span class="line">1654</span><br><span class="line">1655</span><br><span class="line">1656</span><br><span class="line">1657</span><br><span class="line">1658</span><br><span class="line">1659</span><br><span class="line">1660</span><br><span class="line">1661</span><br><span class="line">1662</span><br><span class="line">1663</span><br><span class="line">1664</span><br><span class="line">1665</span><br><span class="line">1666</span><br><span class="line">1667</span><br><span class="line">1668</span><br><span class="line">1669</span><br><span class="line">1670</span><br><span class="line">1671</span><br><span class="line">1672</span><br><span class="line">1673</span><br><span class="line">1674</span><br><span class="line">1675</span><br><span class="line">1676</span><br><span class="line">1677</span><br><span class="line">1678</span><br><span class="line">1679</span><br><span class="line">1680</span><br><span class="line">1681</span><br><span class="line">1682</span><br><span class="line">1683</span><br><span class="line">1684</span><br><span class="line">1685</span><br><span class="line">1686</span><br><span class="line">1687</span><br><span class="line">1688</span><br><span class="line">1689</span><br><span class="line">1690</span><br><span class="line">1691</span><br><span class="line">1692</span><br><span class="line">1693</span><br><span class="line">1694</span><br><span class="line">1695</span><br><span class="line">1696</span><br><span class="line">1697</span><br><span class="line">1698</span><br><span class="line">1699</span><br><span class="line">1700</span><br><span class="line">1701</span><br><span class="line">1702</span><br><span class="line">1703</span><br><span class="line">1704</span><br><span class="line">1705</span><br><span class="line">1706</span><br><span class="line">1707</span><br><span class="line">1708</span><br><span class="line">1709</span><br><span class="line">1710</span><br><span class="line">1711</span><br><span class="line">1712</span><br><span class="line">1713</span><br><span class="line">1714</span><br><span class="line">1715</span><br><span class="line">1716</span><br><span class="line">1717</span><br><span class="line">1718</span><br><span class="line">1719</span><br><span class="line">1720</span><br><span class="line">1721</span><br><span class="line">1722</span><br><span class="line">1723</span><br><span class="line">1724</span><br><span class="line">1725</span><br><span class="line">1726</span><br><span class="line">1727</span><br><span class="line">1728</span><br><span class="line">1729</span><br><span class="line">1730</span><br><span class="line">1731</span><br><span class="line">1732</span><br><span class="line">1733</span><br><span class="line">1734</span><br><span class="line">1735</span><br><span class="line">1736</span><br><span class="line">1737</span><br><span class="line">1738</span><br><span class="line">1739</span><br><span class="line">1740</span><br><span class="line">1741</span><br><span class="line">1742</span><br><span class="line">1743</span><br><span class="line">1744</span><br><span class="line">1745</span><br><span class="line">1746</span><br><span class="line">1747</span><br><span class="line">1748</span><br><span class="line">1749</span><br><span class="line">1750</span><br><span class="line">1751</span><br><span class="line">1752</span><br><span class="line">1753</span><br><span class="line">1754</span><br><span class="line">1755</span><br><span class="line">1756</span><br><span class="line">1757</span><br><span class="line">1758</span><br><span class="line">1759</span><br><span class="line">1760</span><br><span class="line">1761</span><br><span class="line">1762</span><br><span class="line">1763</span><br><span class="line">1764</span><br><span class="line">1765</span><br><span class="line">1766</span><br><span class="line">1767</span><br><span class="line">1768</span><br><span class="line">1769</span><br><span class="line">1770</span><br><span class="line">1771</span><br><span class="line">1772</span><br><span class="line">1773</span><br><span class="line">1774</span><br><span class="line">1775</span><br><span class="line">1776</span><br><span class="line">1777</span><br><span class="line">1778</span><br><span class="line">1779</span><br><span class="line">1780</span><br><span class="line">1781</span><br><span class="line">1782</span><br><span class="line">1783</span><br><span class="line">1784</span><br><span class="line">1785</span><br><span class="line">1786</span><br><span class="line">1787</span><br><span class="line">1788</span><br><span class="line">1789</span><br><span class="line">1790</span><br><span class="line">1791</span><br><span class="line">1792</span><br><span class="line">1793</span><br><span class="line">1794</span><br><span class="line">1795</span><br><span class="line">1796</span><br><span class="line">1797</span><br><span class="line">1798</span><br><span class="line">1799</span><br><span class="line">1800</span><br><span class="line">1801</span><br><span class="line">1802</span><br><span class="line">1803</span><br><span class="line">1804</span><br><span class="line">1805</span><br><span class="line">1806</span><br><span class="line">1807</span><br><span class="line">1808</span><br><span class="line">1809</span><br><span class="line">1810</span><br><span class="line">1811</span><br><span class="line">1812</span><br><span class="line">1813</span><br><span class="line">1814</span><br><span class="line">1815</span><br><span class="line">1816</span><br><span class="line">1817</span><br><span class="line">1818</span><br><span class="line">1819</span><br><span class="line">1820</span><br><span class="line">1821</span><br><span class="line">1822</span><br><span class="line">1823</span><br><span class="line">1824</span><br><span class="line">1825</span><br><span class="line">1826</span><br><span class="line">1827</span><br><span class="line">1828</span><br><span class="line">1829</span><br><span class="line">1830</span><br><span class="line">1831</span><br><span class="line">1832</span><br><span class="line">1833</span><br><span class="line">1834</span><br><span class="line">1835</span><br><span class="line">1836</span><br><span class="line">1837</span><br><span class="line">1838</span><br><span class="line">1839</span><br><span class="line">1840</span><br><span class="line">1841</span><br><span class="line">1842</span><br><span class="line">1843</span><br><span class="line">1844</span><br><span class="line">1845</span><br><span class="line">1846</span><br><span class="line">1847</span><br><span class="line">1848</span><br><span class="line">1849</span><br><span class="line">1850</span><br><span class="line">1851</span><br><span class="line">1852</span><br><span class="line">1853</span><br><span class="line">1854</span><br><span class="line">1855</span><br><span class="line">1856</span><br><span class="line">1857</span><br><span class="line">1858</span><br><span class="line">1859</span><br><span class="line">1860</span><br><span class="line">1861</span><br><span class="line">1862</span><br><span class="line">1863</span><br><span class="line">1864</span><br><span class="line">1865</span><br><span class="line">1866</span><br><span class="line">1867</span><br><span class="line">1868</span><br><span class="line">1869</span><br><span class="line">1870</span><br><span class="line">1871</span><br><span class="line">1872</span><br><span class="line">1873</span><br><span class="line">1874</span><br><span class="line">1875</span><br><span class="line">1876</span><br><span class="line">1877</span><br><span class="line">1878</span><br><span class="line">1879</span><br><span class="line">1880</span><br><span class="line">1881</span><br><span class="line">1882</span><br><span class="line">1883</span><br><span class="line">1884</span><br><span class="line">1885</span><br><span class="line">1886</span><br><span class="line">1887</span><br><span class="line">1888</span><br><span class="line">1889</span><br><span class="line">1890</span><br><span class="line">1891</span><br><span class="line">1892</span><br><span class="line">1893</span><br><span class="line">1894</span><br><span class="line">1895</span><br><span class="line">1896</span><br><span class="line">1897</span><br><span class="line">1898</span><br><span class="line">1899</span><br><span class="line">1900</span><br><span class="line">1901</span><br><span class="line">1902</span><br><span class="line">1903</span><br><span class="line">1904</span><br><span class="line">1905</span><br><span class="line">1906</span><br><span class="line">1907</span><br><span class="line">1908</span><br><span class="line">1909</span><br><span class="line">1910</span><br><span class="line">1911</span><br><span class="line">1912</span><br><span class="line">1913</span><br><span class="line">1914</span><br><span class="line">1915</span><br><span class="line">1916</span><br><span class="line">1917</span><br><span class="line">1918</span><br><span class="line">1919</span><br><span class="line">1920</span><br><span class="line">1921</span><br><span class="line">1922</span><br><span class="line">1923</span><br><span class="line">1924</span><br><span class="line">1925</span><br><span class="line">1926</span><br><span class="line">1927</span><br><span class="line">1928</span><br><span class="line">1929</span><br><span class="line">1930</span><br><span class="line">1931</span><br><span class="line">1932</span><br><span class="line">1933</span><br><span class="line">1934</span><br><span class="line">1935</span><br><span class="line">1936</span><br><span class="line">1937</span><br><span class="line">1938</span><br><span class="line">1939</span><br><span class="line">1940</span><br><span class="line">1941</span><br><span class="line">1942</span><br><span class="line">1943</span><br><span class="line">1944</span><br><span class="line">1945</span><br><span class="line">1946</span><br><span class="line">1947</span><br><span class="line">1948</span><br><span class="line">1949</span><br><span class="line">1950</span><br><span class="line">1951</span><br><span class="line">1952</span><br><span class="line">1953</span><br><span class="line">1954</span><br><span class="line">1955</span><br><span class="line">1956</span><br><span class="line">1957</span><br><span class="line">1958</span><br><span class="line">1959</span><br><span class="line">1960</span><br><span class="line">1961</span><br><span class="line">1962</span><br><span class="line">1963</span><br><span class="line">1964</span><br><span class="line">1965</span><br><span class="line">1966</span><br><span class="line">1967</span><br><span class="line">1968</span><br><span class="line">1969</span><br><span class="line">1970</span><br><span class="line">1971</span><br><span class="line">1972</span><br><span class="line">1973</span><br><span class="line">1974</span><br><span class="line">1975</span><br><span class="line">1976</span><br><span class="line">1977</span><br><span class="line">1978</span><br><span class="line">1979</span><br><span class="line">1980</span><br><span class="line">1981</span><br><span class="line">1982</span><br><span class="line">1983</span><br><span class="line">1984</span><br><span class="line">1985</span><br><span class="line">1986</span><br><span class="line">1987</span><br><span class="line">1988</span><br><span class="line">1989</span><br><span class="line">1990</span><br><span class="line">1991</span><br><span class="line">1992</span><br><span class="line">1993</span><br><span class="line">1994</span><br><span class="line">1995</span><br><span class="line">1996</span><br><span class="line">1997</span><br><span class="line">1998</span><br><span class="line">1999</span><br><span class="line">2000</span><br><span class="line">2001</span><br><span class="line">2002</span><br><span class="line">2003</span><br><span class="line">2004</span><br><span class="line">2005</span><br><span class="line">2006</span><br><span class="line">2007</span><br><span class="line">2008</span><br><span class="line">2009</span><br><span class="line">2010</span><br><span class="line">2011</span><br><span class="line">2012</span><br><span class="line">2013</span><br><span class="line">2014</span><br><span class="line">2015</span><br><span class="line">2016</span><br><span class="line">2017</span><br><span class="line">2018</span><br><span class="line">2019</span><br><span class="line">2020</span><br><span class="line">2021</span><br><span class="line">2022</span><br><span class="line">2023</span><br><span class="line">2024</span><br><span class="line">2025</span><br><span class="line">2026</span><br><span class="line">2027</span><br><span class="line">2028</span><br><span class="line">2029</span><br><span class="line">2030</span><br><span class="line">2031</span><br><span class="line">2032</span><br><span class="line">2033</span><br><span class="line">2034</span><br><span class="line">2035</span><br><span class="line">2036</span><br><span class="line">2037</span><br><span class="line">2038</span><br><span class="line">2039</span><br><span class="line">2040</span><br><span class="line">2041</span><br><span class="line">2042</span><br><span class="line">2043</span><br><span class="line">2044</span><br><span class="line">2045</span><br><span class="line">2046</span><br><span class="line">2047</span><br><span class="line">2048</span><br><span class="line">2049</span><br><span class="line">2050</span><br><span class="line">2051</span><br><span class="line">2052</span><br><span class="line">2053</span><br><span class="line">2054</span><br><span class="line">2055</span><br><span class="line">2056</span><br><span class="line">2057</span><br><span class="line">2058</span><br><span class="line">2059</span><br><span class="line">2060</span><br><span class="line">2061</span><br><span class="line">2062</span><br><span class="line">2063</span><br><span class="line">2064</span><br><span class="line">2065</span><br><span class="line">2066</span><br><span class="line">2067</span><br><span class="line">2068</span><br><span class="line">2069</span><br><span class="line">2070</span><br><span class="line">2071</span><br><span class="line">2072</span><br><span class="line">2073</span><br><span class="line">2074</span><br><span class="line">2075</span><br><span class="line">2076</span><br><span class="line">2077</span><br><span class="line">2078</span><br><span class="line">2079</span><br><span class="line">2080</span><br><span class="line">2081</span><br><span class="line">2082</span><br><span class="line">2083</span><br><span class="line">2084</span><br><span class="line">2085</span><br><span class="line">2086</span><br><span class="line">2087</span><br><span class="line">2088</span><br><span class="line">2089</span><br><span class="line">2090</span><br><span class="line">2091</span><br><span class="line">2092</span><br><span class="line">2093</span><br><span class="line">2094</span><br><span class="line">2095</span><br><span class="line">2096</span><br><span class="line">2097</span><br><span class="line">2098</span><br><span class="line">2099</span><br><span class="line">2100</span><br><span class="line">2101</span><br><span class="line">2102</span><br><span class="line">2103</span><br><span class="line">2104</span><br><span class="line">2105</span><br><span class="line">2106</span><br><span class="line">2107</span><br><span class="line">2108</span><br><span class="line">2109</span><br><span class="line">2110</span><br><span class="line">2111</span><br><span class="line">2112</span><br><span class="line">2113</span><br><span class="line">2114</span><br><span class="line">2115</span><br><span class="line">2116</span><br><span class="line">2117</span><br><span class="line">2118</span><br><span class="line">2119</span><br><span class="line">2120</span><br><span class="line">2121</span><br><span class="line">2122</span><br><span class="line">2123</span><br><span class="line">2124</span><br><span class="line">2125</span><br><span class="line">2126</span><br><span class="line">2127</span><br><span class="line">2128</span><br><span class="line">2129</span><br><span class="line">2130</span><br><span class="line">2131</span><br><span class="line">2132</span><br><span class="line">2133</span><br><span class="line">2134</span><br><span class="line">2135</span><br><span class="line">2136</span><br><span class="line">2137</span><br><span class="line">2138</span><br><span class="line">2139</span><br><span class="line">2140</span><br><span class="line">2141</span><br><span class="line">2142</span><br><span class="line">2143</span><br><span class="line">2144</span><br><span class="line">2145</span><br><span class="line">2146</span><br><span class="line">2147</span><br><span class="line">2148</span><br><span class="line">2149</span><br><span class="line">2150</span><br><span class="line">2151</span><br><span class="line">2152</span><br><span class="line">2153</span><br><span class="line">2154</span><br><span class="line">2155</span><br><span class="line">2156</span><br><span class="line">2157</span><br><span class="line">2158</span><br><span class="line">2159</span><br><span class="line">2160</span><br><span class="line">2161</span><br><span class="line">2162</span><br><span class="line">2163</span><br><span class="line">2164</span><br><span class="line">2165</span><br><span class="line">2166</span><br><span class="line">2167</span><br><span class="line">2168</span><br><span class="line">2169</span><br><span class="line">2170</span><br><span class="line">2171</span><br><span class="line">2172</span><br><span class="line">2173</span><br><span class="line">2174</span><br><span class="line">2175</span><br><span class="line">2176</span><br><span class="line">2177</span><br><span class="line">2178</span><br><span class="line">2179</span><br><span class="line">2180</span><br><span class="line">2181</span><br><span class="line">2182</span><br><span class="line">2183</span><br><span class="line">2184</span><br><span class="line">2185</span><br><span class="line">2186</span><br><span class="line">2187</span><br><span class="line">2188</span><br><span class="line">2189</span><br><span class="line">2190</span><br><span class="line">2191</span><br><span class="line">2192</span><br><span class="line">2193</span><br><span class="line">2194</span><br><span class="line">2195</span><br><span class="line">2196</span><br><span class="line">2197</span><br><span class="line">2198</span><br><span class="line">2199</span><br><span class="line">2200</span><br><span class="line">2201</span><br><span class="line">2202</span><br><span class="line">2203</span><br><span class="line">2204</span><br><span class="line">2205</span><br><span class="line">2206</span><br><span class="line">2207</span><br><span class="line">2208</span><br><span class="line">2209</span><br><span class="line">2210</span><br><span class="line">2211</span><br><span class="line">2212</span><br><span class="line">2213</span><br><span class="line">2214</span><br><span class="line">2215</span><br><span class="line">2216</span><br><span class="line">2217</span><br><span class="line">2218</span><br><span class="line">2219</span><br><span class="line">2220</span><br><span class="line">2221</span><br><span class="line">2222</span><br><span class="line">2223</span><br><span class="line">2224</span><br><span class="line">2225</span><br><span class="line">2226</span><br><span class="line">2227</span><br><span class="line">2228</span><br><span class="line">2229</span><br><span class="line">2230</span><br><span class="line">2231</span><br><span class="line">2232</span><br><span class="line">2233</span><br><span class="line">2234</span><br><span class="line">2235</span><br><span class="line">2236</span><br><span class="line">2237</span><br><span class="line">2238</span><br><span class="line">2239</span><br><span class="line">2240</span><br><span class="line">2241</span><br><span class="line">2242</span><br><span class="line">2243</span><br><span class="line">2244</span><br><span class="line">2245</span><br><span class="line">2246</span><br><span class="line">2247</span><br><span class="line">2248</span><br><span class="line">2249</span><br><span class="line">2250</span><br><span class="line">2251</span><br><span class="line">2252</span><br><span class="line">2253</span><br><span class="line">2254</span><br><span class="line">2255</span><br><span class="line">2256</span><br><span class="line">2257</span><br><span class="line">2258</span><br><span class="line">2259</span><br><span class="line">2260</span><br><span class="line">2261</span><br><span class="line">2262</span><br><span class="line">2263</span><br><span class="line">2264</span><br><span class="line">2265</span><br><span class="line">2266</span><br><span class="line">2267</span><br><span class="line">2268</span><br><span class="line">2269</span><br><span class="line">2270</span><br><span class="line">2271</span><br><span class="line">2272</span><br><span class="line">2273</span><br><span class="line">2274</span><br><span class="line">2275</span><br><span class="line">2276</span><br><span class="line">2277</span><br><span class="line">2278</span><br><span class="line">2279</span><br><span class="line">2280</span><br><span class="line">2281</span><br><span class="line">2282</span><br><span class="line">2283</span><br><span class="line">2284</span><br><span class="line">2285</span><br><span class="line">2286</span><br><span class="line">2287</span><br><span class="line">2288</span><br><span class="line">2289</span><br><span class="line">2290</span><br><span class="line">2291</span><br><span class="line">2292</span><br><span class="line">2293</span><br><span class="line">2294</span><br><span class="line">2295</span><br><span class="line">2296</span><br><span class="line">2297</span><br><span class="line">2298</span><br><span class="line">2299</span><br><span class="line">2300</span><br><span class="line">2301</span><br><span class="line">2302</span><br><span class="line">2303</span><br><span class="line">2304</span><br><span class="line">2305</span><br><span class="line">2306</span><br><span class="line">2307</span><br><span class="line">2308</span><br><span class="line">2309</span><br><span class="line">2310</span><br><span class="line">2311</span><br><span class="line">2312</span><br><span class="line">2313</span><br><span class="line">2314</span><br><span class="line">2315</span><br><span class="line">2316</span><br><span class="line">2317</span><br><span class="line">2318</span><br><span class="line">2319</span><br><span class="line">2320</span><br><span class="line">2321</span><br><span class="line">2322</span><br><span class="line">2323</span><br><span class="line">2324</span><br><span class="line">2325</span><br><span class="line">2326</span><br><span class="line">2327</span><br><span class="line">2328</span><br><span class="line">2329</span><br><span class="line">2330</span><br><span class="line">2331</span><br><span class="line">2332</span><br><span class="line">2333</span><br><span class="line">2334</span><br><span class="line">2335</span><br><span class="line">2336</span><br><span class="line">2337</span><br><span class="line">2338</span><br><span class="line">2339</span><br><span class="line">2340</span><br><span class="line">2341</span><br><span class="line">2342</span><br><span class="line">2343</span><br><span class="line">2344</span><br><span class="line">2345</span><br><span class="line">2346</span><br><span class="line">2347</span><br><span class="line">2348</span><br><span class="line">2349</span><br><span class="line">2350</span><br><span class="line">2351</span><br><span class="line">2352</span><br><span class="line">2353</span><br><span class="line">2354</span><br><span class="line">2355</span><br><span class="line">2356</span><br><span class="line">2357</span><br><span class="line">2358</span><br><span class="line">2359</span><br><span class="line">2360</span><br><span class="line">2361</span><br><span class="line">2362</span><br><span class="line">2363</span><br><span class="line">2364</span><br><span class="line">2365</span><br><span class="line">2366</span><br><span class="line">2367</span><br><span class="line">2368</span><br><span class="line">2369</span><br><span class="line">2370</span><br><span class="line">2371</span><br><span class="line">2372</span><br><span class="line">2373</span><br><span class="line">2374</span><br><span class="line">2375</span><br><span class="line">2376</span><br><span class="line">2377</span><br><span class="line">2378</span><br><span class="line">2379</span><br><span class="line">2380</span><br><span class="line">2381</span><br><span class="line">2382</span><br><span class="line">2383</span><br><span class="line">2384</span><br><span class="line">2385</span><br><span class="line">2386</span><br><span class="line">2387</span><br><span class="line">2388</span><br><span class="line">2389</span><br><span class="line">2390</span><br><span class="line">2391</span><br><span class="line">2392</span><br><span class="line">2393</span><br><span class="line">2394</span><br><span class="line">2395</span><br><span class="line">2396</span><br><span class="line">2397</span><br><span class="line">2398</span><br><span class="line">2399</span><br><span class="line">2400</span><br><span class="line">2401</span><br><span class="line">2402</span><br><span class="line">2403</span><br><span class="line">2404</span><br><span class="line">2405</span><br><span class="line">2406</span><br><span class="line">2407</span><br><span class="line">2408</span><br><span class="line">2409</span><br><span class="line">2410</span><br><span class="line">2411</span><br><span class="line">2412</span><br><span class="line">2413</span><br><span class="line">2414</span><br><span class="line">2415</span><br><span class="line">2416</span><br><span class="line">2417</span><br><span class="line">2418</span><br><span class="line">2419</span><br><span class="line">2420</span><br><span class="line">2421</span><br><span class="line">2422</span><br><span class="line">2423</span><br><span class="line">2424</span><br><span class="line">2425</span><br><span class="line">2426</span><br><span class="line">2427</span><br><span class="line">2428</span><br><span class="line">2429</span><br><span class="line">2430</span><br><span class="line">2431</span><br><span class="line">2432</span><br><span class="line">2433</span><br><span class="line">2434</span><br><span class="line">2435</span><br><span class="line">2436</span><br><span class="line">2437</span><br><span class="line">2438</span><br><span class="line">2439</span><br><span class="line">2440</span><br><span class="line">2441</span><br><span class="line">2442</span><br><span class="line">2443</span><br><span class="line">2444</span><br><span class="line">2445</span><br><span class="line">2446</span><br><span class="line">2447</span><br><span class="line">2448</span><br><span class="line">2449</span><br><span class="line">2450</span><br><span class="line">2451</span><br><span class="line">2452</span><br><span class="line">2453</span><br><span class="line">2454</span><br><span class="line">2455</span><br><span class="line">2456</span><br><span class="line">2457</span><br><span class="line">2458</span><br><span class="line">2459</span><br><span class="line">2460</span><br><span class="line">2461</span><br><span class="line">2462</span><br><span class="line">2463</span><br><span class="line">2464</span><br><span class="line">2465</span><br><span class="line">2466</span><br><span class="line">2467</span><br><span class="line">2468</span><br><span class="line">2469</span><br><span class="line">2470</span><br><span class="line">2471</span><br><span class="line">2472</span><br><span class="line">2473</span><br><span class="line">2474</span><br><span class="line">2475</span><br><span class="line">2476</span><br><span class="line">2477</span><br><span class="line">2478</span><br><span class="line">2479</span><br><span class="line">2480</span><br><span class="line">2481</span><br><span class="line">2482</span><br><span class="line">2483</span><br><span class="line">2484</span><br><span class="line">2485</span><br><span class="line">2486</span><br><span class="line">2487</span><br><span class="line">2488</span><br><span class="line">2489</span><br><span class="line">2490</span><br><span class="line">2491</span><br><span class="line">2492</span><br><span class="line">2493</span><br><span class="line">2494</span><br><span class="line">2495</span><br><span class="line">2496</span><br><span class="line">2497</span><br><span class="line">2498</span><br><span class="line">2499</span><br><span class="line">2500</span><br><span class="line">2501</span><br><span class="line">2502</span><br><span class="line">2503</span><br><span class="line">2504</span><br><span class="line">2505</span><br><span class="line">2506</span><br><span class="line">2507</span><br><span class="line">2508</span><br><span class="line">2509</span><br><span class="line">2510</span><br><span class="line">2511</span><br><span class="line">2512</span><br><span class="line">2513</span><br><span class="line">2514</span><br><span class="line">2515</span><br><span class="line">2516</span><br><span class="line">2517</span><br><span class="line">2518</span><br><span class="line">2519</span><br><span class="line">2520</span><br><span class="line">2521</span><br><span class="line">2522</span><br><span class="line">2523</span><br><span class="line">2524</span><br><span class="line">2525</span><br><span class="line">2526</span><br><span class="line">2527</span><br><span class="line">2528</span><br><span class="line">2529</span><br><span class="line">2530</span><br><span class="line">2531</span><br><span class="line">2532</span><br><span class="line">2533</span><br><span class="line">2534</span><br><span class="line">2535</span><br><span class="line">2536</span><br><span class="line">2537</span><br><span class="line">2538</span><br><span class="line">2539</span><br><span class="line">2540</span><br><span class="line">2541</span><br><span class="line">2542</span><br><span class="line">2543</span><br><span class="line">2544</span><br><span class="line">2545</span><br><span class="line">2546</span><br><span class="line">2547</span><br><span class="line">2548</span><br><span class="line">2549</span><br><span class="line">2550</span><br><span class="line">2551</span><br><span class="line">2552</span><br><span class="line">2553</span><br><span class="line">2554</span><br><span class="line">2555</span><br><span class="line">2556</span><br><span class="line">2557</span><br><span class="line">2558</span><br><span class="line">2559</span><br><span class="line">2560</span><br><span class="line">2561</span><br><span class="line">2562</span><br><span class="line">2563</span><br><span class="line">2564</span><br><span class="line">2565</span><br><span class="line">2566</span><br><span class="line">2567</span><br><span class="line">2568</span><br><span class="line">2569</span><br><span class="line">2570</span><br><span class="line">2571</span><br><span class="line">2572</span><br><span class="line">2573</span><br><span class="line">2574</span><br><span class="line">2575</span><br><span class="line">2576</span><br><span class="line">2577</span><br><span class="line">2578</span><br><span class="line">2579</span><br><span class="line">2580</span><br><span class="line">2581</span><br><span class="line">2582</span><br><span class="line">2583</span><br><span class="line">2584</span><br><span class="line">2585</span><br><span class="line">2586</span><br><span class="line">2587</span><br><span class="line">2588</span><br><span class="line">2589</span><br><span class="line">2590</span><br><span class="line">2591</span><br><span class="line">2592</span><br><span class="line">2593</span><br><span class="line">2594</span><br><span class="line">2595</span><br><span class="line">2596</span><br><span class="line">2597</span><br><span class="line">2598</span><br><span class="line">2599</span><br><span class="line">2600</span><br><span class="line">2601</span><br><span class="line">2602</span><br><span class="line">2603</span><br><span class="line">2604</span><br><span class="line">2605</span><br><span class="line">2606</span><br><span class="line">2607</span><br><span class="line">2608</span><br><span class="line">2609</span><br><span class="line">2610</span><br><span class="line">2611</span><br><span class="line">2612</span><br><span class="line">2613</span><br><span class="line">2614</span><br><span class="line">2615</span><br><span class="line">2616</span><br><span class="line">2617</span><br><span class="line">2618</span><br><span class="line">2619</span><br><span class="line">2620</span><br><span class="line">2621</span><br><span class="line">2622</span><br><span class="line">2623</span><br><span class="line">2624</span><br><span class="line">2625</span><br><span class="line">2626</span><br><span class="line">2627</span><br><span class="line">2628</span><br><span class="line">2629</span><br><span class="line">2630</span><br><span class="line">2631</span><br><span class="line">2632</span><br><span class="line">2633</span><br><span class="line">2634</span><br><span class="line">2635</span><br><span class="line">2636</span><br><span class="line">2637</span><br><span class="line">2638</span><br><span class="line">2639</span><br><span class="line">2640</span><br><span class="line">2641</span><br><span class="line">2642</span><br><span class="line">2643</span><br><span class="line">2644</span><br><span class="line">2645</span><br><span class="line">2646</span><br><span class="line">2647</span><br><span class="line">2648</span><br><span class="line">2649</span><br><span class="line">2650</span><br><span class="line">2651</span><br><span class="line">2652</span><br><span class="line">2653</span><br><span class="line">2654</span><br><span class="line">2655</span><br><span class="line">2656</span><br><span class="line">2657</span><br><span class="line">2658</span><br><span class="line">2659</span><br><span class="line">2660</span><br><span class="line">2661</span><br><span class="line">2662</span><br><span class="line">2663</span><br><span class="line">2664</span><br><span class="line">2665</span><br><span class="line">2666</span><br><span class="line">2667</span><br><span class="line">2668</span><br><span class="line">2669</span><br><span class="line">2670</span><br><span class="line">2671</span><br><span class="line">2672</span><br><span class="line">2673</span><br><span class="line">2674</span><br><span class="line">2675</span><br><span class="line">2676</span><br><span class="line">2677</span><br><span class="line">2678</span><br><span class="line">2679</span><br><span class="line">2680</span><br><span class="line">2681</span><br><span class="line">2682</span><br><span class="line">2683</span><br><span class="line">2684</span><br><span class="line">2685</span><br><span class="line">2686</span><br><span class="line">2687</span><br><span class="line">2688</span><br><span class="line">2689</span><br><span class="line">2690</span><br><span class="line">2691</span><br><span class="line">2692</span><br><span class="line">2693</span><br><span class="line">2694</span><br><span class="line">2695</span><br><span class="line">2696</span><br><span class="line">2697</span><br><span class="line">2698</span><br><span class="line">2699</span><br><span class="line">2700</span><br><span class="line">2701</span><br><span class="line">2702</span><br><span class="line">2703</span><br><span class="line">2704</span><br><span class="line">2705</span><br><span class="line">2706</span><br><span class="line">2707</span><br><span class="line">2708</span><br><span class="line">2709</span><br><span class="line">2710</span><br><span class="line">2711</span><br><span class="line">2712</span><br><span class="line">2713</span><br><span class="line">2714</span><br><span class="line">2715</span><br><span class="line">2716</span><br><span class="line">2717</span><br><span class="line">2718</span><br><span class="line">2719</span><br><span class="line">2720</span><br><span class="line">2721</span><br><span class="line">2722</span><br><span class="line">2723</span><br><span class="line">2724</span><br><span class="line">2725</span><br><span class="line">2726</span><br><span class="line">2727</span><br><span class="line">2728</span><br><span class="line">2729</span><br><span class="line">2730</span><br><span class="line">2731</span><br><span class="line">2732</span><br><span class="line">2733</span><br><span class="line">2734</span><br><span class="line">2735</span><br><span class="line">2736</span><br><span class="line">2737</span><br><span class="line">2738</span><br><span class="line">2739</span><br><span class="line">2740</span><br><span class="line">2741</span><br><span class="line">2742</span><br><span class="line">2743</span><br><span class="line">2744</span><br><span class="line">2745</span><br><span class="line">2746</span><br><span class="line">2747</span><br><span class="line">2748</span><br><span class="line">2749</span><br><span class="line">2750</span><br><span class="line">2751</span><br><span class="line">2752</span><br><span class="line">2753</span><br><span class="line">2754</span><br><span class="line">2755</span><br><span class="line">2756</span><br><span class="line">2757</span><br><span class="line">2758</span><br><span class="line">2759</span><br><span class="line">2760</span><br><span class="line">2761</span><br><span class="line">2762</span><br><span class="line">2763</span><br><span class="line">2764</span><br><span class="line">2765</span><br><span class="line">2766</span><br><span class="line">2767</span><br><span class="line">2768</span><br><span class="line">2769</span><br><span class="line">2770</span><br><span class="line">2771</span><br><span class="line">2772</span><br><span class="line">2773</span><br><span class="line">2774</span><br><span class="line">2775</span><br><span class="line">2776</span><br><span class="line">2777</span><br><span class="line">2778</span><br><span class="line">2779</span><br><span class="line">2780</span><br><span class="line">2781</span><br><span class="line">2782</span><br><span class="line">2783</span><br><span class="line">2784</span><br><span class="line">2785</span><br><span class="line">2786</span><br><span class="line">2787</span><br><span class="line">2788</span><br><span class="line">2789</span><br><span class="line">2790</span><br><span class="line">2791</span><br><span class="line">2792</span><br><span class="line">2793</span><br><span class="line">2794</span><br><span class="line">2795</span><br><span class="line">2796</span><br><span class="line">2797</span><br><span class="line">2798</span><br><span class="line">2799</span><br><span class="line">2800</span><br><span class="line">2801</span><br><span class="line">2802</span><br><span class="line">2803</span><br><span class="line">2804</span><br><span class="line">2805</span><br><span class="line">2806</span><br><span class="line">2807</span><br><span class="line">2808</span><br><span class="line">2809</span><br><span class="line">2810</span><br><span class="line">2811</span><br><span class="line">2812</span><br><span class="line">2813</span><br><span class="line">2814</span><br><span class="line">2815</span><br><span class="line">2816</span><br><span class="line">2817</span><br><span class="line">2818</span><br><span class="line">2819</span><br><span class="line">2820</span><br><span class="line">2821</span><br><span class="line">2822</span><br><span class="line">2823</span><br><span class="line">2824</span><br><span class="line">2825</span><br><span class="line">2826</span><br><span class="line">2827</span><br><span class="line">2828</span><br><span class="line">2829</span><br><span class="line">2830</span><br><span class="line">2831</span><br><span class="line">2832</span><br><span class="line">2833</span><br><span class="line">2834</span><br><span class="line">2835</span><br><span class="line">2836</span><br><span class="line">2837</span><br><span class="line">2838</span><br><span class="line">2839</span><br><span class="line">2840</span><br><span class="line">2841</span><br><span class="line">2842</span><br><span class="line">2843</span><br><span class="line">2844</span><br><span class="line">2845</span><br><span class="line">2846</span><br><span class="line">2847</span><br><span class="line">2848</span><br><span class="line">2849</span><br><span class="line">2850</span><br><span class="line">2851</span><br><span class="line">2852</span><br><span class="line">2853</span><br><span class="line">2854</span><br><span class="line">2855</span><br><span class="line">2856</span><br><span class="line">2857</span><br><span class="line">2858</span><br><span class="line">2859</span><br><span class="line">2860</span><br><span class="line">2861</span><br><span class="line">2862</span><br><span class="line">2863</span><br><span class="line">2864</span><br><span class="line">2865</span><br><span class="line">2866</span><br><span class="line">2867</span><br><span class="line">2868</span><br><span class="line">2869</span><br><span class="line">2870</span><br><span class="line">2871</span><br><span class="line">2872</span><br><span class="line">2873</span><br><span class="line">2874</span><br><span class="line">2875</span><br><span class="line">2876</span><br><span class="line">2877</span><br><span class="line">2878</span><br><span class="line">2879</span><br><span class="line">2880</span><br><span class="line">2881</span><br><span class="line">2882</span><br><span class="line">2883</span><br><span class="line">2884</span><br><span class="line">2885</span><br><span class="line">2886</span><br><span class="line">2887</span><br><span class="line">2888</span><br><span class="line">2889</span><br><span class="line">2890</span><br><span class="line">2891</span><br><span class="line">2892</span><br><span class="line">2893</span><br><span class="line">2894</span><br><span class="line">2895</span><br><span class="line">2896</span><br><span class="line">2897</span><br><span class="line">2898</span><br><span class="line">2899</span><br><span class="line">2900</span><br><span class="line">2901</span><br><span class="line">2902</span><br><span class="line">2903</span><br><span class="line">2904</span><br><span class="line">2905</span><br><span class="line">2906</span><br><span class="line">2907</span><br><span class="line">2908</span><br><span class="line">2909</span><br><span class="line">2910</span><br><span class="line">2911</span><br><span class="line">2912</span><br><span class="line">2913</span><br><span class="line">2914</span><br><span class="line">2915</span><br><span class="line">2916</span><br><span class="line">2917</span><br><span class="line">2918</span><br><span class="line">2919</span><br><span class="line">2920</span><br><span class="line">2921</span><br><span class="line">2922</span><br><span class="line">2923</span><br><span class="line">2924</span><br><span class="line">2925</span><br><span class="line">2926</span><br><span class="line">2927</span><br><span class="line">2928</span><br><span class="line">2929</span><br><span class="line">2930</span><br><span class="line">2931</span><br><span class="line">2932</span><br><span class="line">2933</span><br><span class="line">2934</span><br><span class="line">2935</span><br><span class="line">2936</span><br><span class="line">2937</span><br><span class="line">2938</span><br><span class="line">2939</span><br><span class="line">2940</span><br><span class="line">2941</span><br><span class="line">2942</span><br><span class="line">2943</span><br><span class="line">2944</span><br><span class="line">2945</span><br><span class="line">2946</span><br><span class="line">2947</span><br><span class="line">2948</span><br><span class="line">2949</span><br><span class="line">2950</span><br><span class="line">2951</span><br><span class="line">2952</span><br><span class="line">2953</span><br><span class="line">2954</span><br><span class="line">2955</span><br><span class="line">2956</span><br><span class="line">2957</span><br><span class="line">2958</span><br><span class="line">2959</span><br><span class="line">2960</span><br><span class="line">2961</span><br><span class="line">2962</span><br><span class="line">2963</span><br><span class="line">2964</span><br><span class="line">2965</span><br><span class="line">2966</span><br><span class="line">2967</span><br><span class="line">2968</span><br><span class="line">2969</span><br><span class="line">2970</span><br><span class="line">2971</span><br><span class="line">2972</span><br><span class="line">2973</span><br><span class="line">2974</span><br><span class="line">2975</span><br><span class="line">2976</span><br><span class="line">2977</span><br><span class="line">2978</span><br><span class="line">2979</span><br><span class="line">2980</span><br><span class="line">2981</span><br><span class="line">2982</span><br><span class="line">2983</span><br><span class="line">2984</span><br><span class="line">2985</span><br><span class="line">2986</span><br><span class="line">2987</span><br><span class="line">2988</span><br><span class="line">2989</span><br><span class="line">2990</span><br><span class="line">2991</span><br><span class="line">2992</span><br><span class="line">2993</span><br><span class="line">2994</span><br><span class="line">2995</span><br><span class="line">2996</span><br><span class="line">2997</span><br><span class="line">2998</span><br><span class="line">2999</span><br><span class="line">3000</span><br><span class="line">3001</span><br><span class="line">3002</span><br><span class="line">3003</span><br><span class="line">3004</span><br><span class="line">3005</span><br><span class="line">3006</span><br><span class="line">3007</span><br><span class="line">3008</span><br><span class="line">3009</span><br><span class="line">3010</span><br><span class="line">3011</span><br><span class="line">3012</span><br><span class="line">3013</span><br><span class="line">3014</span><br><span class="line">3015</span><br><span class="line">3016</span><br><span class="line">3017</span><br><span class="line">3018</span><br><span class="line">3019</span><br><span class="line">3020</span><br><span class="line">3021</span><br><span class="line">3022</span><br><span class="line">3023</span><br><span class="line">3024</span><br><span class="line">3025</span><br><span class="line">3026</span><br><span class="line">3027</span><br><span class="line">3028</span><br><span class="line">3029</span><br><span class="line">3030</span><br><span class="line">3031</span><br><span class="line">3032</span><br><span class="line">3033</span><br><span class="line">3034</span><br><span class="line">3035</span><br><span class="line">3036</span><br><span class="line">3037</span><br><span class="line">3038</span><br><span class="line">3039</span><br><span class="line">3040</span><br><span class="line">3041</span><br><span class="line">3042</span><br><span class="line">3043</span><br><span class="line">3044</span><br><span class="line">3045</span><br><span class="line">3046</span><br><span class="line">3047</span><br><span class="line">3048</span><br><span class="line">3049</span><br><span class="line">3050</span><br><span class="line">3051</span><br><span class="line">3052</span><br><span class="line">3053</span><br><span class="line">3054</span><br><span class="line">3055</span><br><span class="line">3056</span><br><span class="line">3057</span><br><span class="line">3058</span><br><span class="line">3059</span><br><span class="line">3060</span><br><span class="line">3061</span><br><span class="line">3062</span><br><span class="line">3063</span><br><span class="line">3064</span><br><span class="line">3065</span><br><span class="line">3066</span><br><span class="line">3067</span><br><span class="line">3068</span><br><span class="line">3069</span><br><span class="line">3070</span><br><span class="line">3071</span><br><span class="line">3072</span><br><span class="line">3073</span><br><span class="line">3074</span><br><span class="line">3075</span><br><span class="line">3076</span><br><span class="line">3077</span><br><span class="line">3078</span><br><span class="line">3079</span><br><span class="line">3080</span><br><span class="line">3081</span><br><span class="line">3082</span><br><span class="line">3083</span><br><span class="line">3084</span><br><span class="line">3085</span><br><span class="line">3086</span><br><span class="line">3087</span><br><span class="line">3088</span><br><span class="line">3089</span><br><span class="line">3090</span><br><span class="line">3091</span><br><span class="line">3092</span><br><span class="line">3093</span><br><span class="line">3094</span><br><span class="line">3095</span><br><span class="line">3096</span><br><span class="line">3097</span><br><span class="line">3098</span><br><span class="line">3099</span><br><span class="line">3100</span><br><span class="line">3101</span><br><span class="line">3102</span><br><span class="line">3103</span><br><span class="line">3104</span><br><span class="line">3105</span><br><span class="line">3106</span><br><span class="line">3107</span><br><span class="line">3108</span><br><span class="line">3109</span><br><span class="line">3110</span><br><span class="line">3111</span><br><span class="line">3112</span><br><span class="line">3113</span><br><span class="line">3114</span><br><span class="line">3115</span><br><span class="line">3116</span><br><span class="line">3117</span><br><span class="line">3118</span><br><span class="line">3119</span><br><span class="line">3120</span><br><span class="line">3121</span><br><span class="line">3122</span><br><span class="line">3123</span><br><span class="line">3124</span><br><span class="line">3125</span><br><span class="line">3126</span><br><span class="line">3127</span><br><span class="line">3128</span><br><span class="line">3129</span><br><span class="line">3130</span><br><span class="line">3131</span><br><span class="line">3132</span><br><span class="line">3133</span><br><span class="line">3134</span><br><span class="line">3135</span><br><span class="line">3136</span><br><span class="line">3137</span><br><span class="line">3138</span><br><span class="line">3139</span><br><span class="line">3140</span><br><span class="line">3141</span><br><span class="line">3142</span><br><span class="line">3143</span><br><span class="line">3144</span><br><span class="line">3145</span><br><span class="line">3146</span><br><span class="line">3147</span><br><span class="line">3148</span><br><span class="line">3149</span><br><span class="line">3150</span><br><span class="line">3151</span><br><span class="line">3152</span><br><span class="line">3153</span><br><span class="line">3154</span><br><span class="line">3155</span><br><span class="line">3156</span><br><span class="line">3157</span><br><span class="line">3158</span><br><span class="line">3159</span><br><span class="line">3160</span><br><span class="line">3161</span><br><span class="line">3162</span><br><span class="line">3163</span><br><span class="line">3164</span><br><span class="line">3165</span><br><span class="line">3166</span><br><span class="line">3167</span><br><span class="line">3168</span><br><span class="line">3169</span><br><span class="line">3170</span><br><span class="line">3171</span><br><span class="line">3172</span><br><span class="line">3173</span><br><span class="line">3174</span><br><span class="line">3175</span><br><span class="line">3176</span><br><span class="line">3177</span><br><span class="line">3178</span><br><span class="line">3179</span><br><span class="line">3180</span><br><span class="line">3181</span><br><span class="line">3182</span><br><span class="line">3183</span><br><span class="line">3184</span><br><span class="line">3185</span><br><span class="line">3186</span><br><span class="line">3187</span><br><span class="line">3188</span><br><span class="line">3189</span><br><span class="line">3190</span><br><span class="line">3191</span><br><span class="line">3192</span><br><span class="line">3193</span><br><span class="line">3194</span><br><span class="line">3195</span><br><span class="line">3196</span><br><span class="line">3197</span><br><span class="line">3198</span><br><span class="line">3199</span><br><span class="line">3200</span><br><span class="line">3201</span><br><span class="line">3202</span><br><span class="line">3203</span><br><span class="line">3204</span><br><span class="line">3205</span><br><span class="line">3206</span><br><span class="line">3207</span><br><span class="line">3208</span><br><span class="line">3209</span><br><span class="line">3210</span><br><span class="line">3211</span><br><span class="line">3212</span><br><span class="line">3213</span><br><span class="line">3214</span><br><span class="line">3215</span><br><span class="line">3216</span><br><span class="line">3217</span><br><span class="line">3218</span><br><span class="line">3219</span><br><span class="line">3220</span><br><span class="line">3221</span><br><span class="line">3222</span><br><span class="line">3223</span><br><span class="line">3224</span><br><span class="line">3225</span><br><span class="line">3226</span><br><span class="line">3227</span><br><span class="line">3228</span><br><span class="line">3229</span><br><span class="line">3230</span><br><span class="line">3231</span><br><span class="line">3232</span><br><span class="line">3233</span><br><span class="line">3234</span><br><span class="line">3235</span><br><span class="line">3236</span><br><span class="line">3237</span><br><span class="line">3238</span><br><span class="line">3239</span><br><span class="line">3240</span><br><span class="line">3241</span><br><span class="line">3242</span><br><span class="line">3243</span><br><span class="line">3244</span><br><span class="line">3245</span><br><span class="line">3246</span><br><span class="line">3247</span><br><span class="line">3248</span><br><span class="line">3249</span><br><span class="line">3250</span><br><span class="line">3251</span><br><span class="line">3252</span><br><span class="line">3253</span><br><span class="line">3254</span><br><span class="line">3255</span><br><span class="line">3256</span><br><span class="line">3257</span><br><span class="line">3258</span><br><span class="line">3259</span><br><span class="line">3260</span><br><span class="line">3261</span><br><span class="line">3262</span><br><span class="line">3263</span><br><span class="line">3264</span><br><span class="line">3265</span><br><span class="line">3266</span><br><span class="line">3267</span><br><span class="line">3268</span><br><span class="line">3269</span><br><span class="line">3270</span><br><span class="line">3271</span><br><span class="line">3272</span><br><span class="line">3273</span><br><span class="line">3274</span><br><span class="line">3275</span><br><span class="line">3276</span><br><span class="line">3277</span><br><span class="line">3278</span><br><span class="line">3279</span><br><span class="line">3280</span><br><span class="line">3281</span><br><span class="line">3282</span><br><span class="line">3283</span><br><span class="line">3284</span><br><span class="line">3285</span><br><span class="line">3286</span><br><span class="line">3287</span><br><span class="line">3288</span><br><span class="line">3289</span><br><span class="line">3290</span><br><span class="line">3291</span><br><span class="line">3292</span><br><span class="line">3293</span><br><span class="line">3294</span><br><span class="line">3295</span><br><span class="line">3296</span><br><span class="line">3297</span><br><span class="line">3298</span><br><span class="line">3299</span><br><span class="line">3300</span><br><span class="line">3301</span><br><span class="line">3302</span><br><span class="line">3303</span><br><span class="line">3304</span><br><span class="line">3305</span><br><span class="line">3306</span><br><span class="line">3307</span><br><span class="line">3308</span><br><span class="line">3309</span><br><span class="line">3310</span><br><span class="line">3311</span><br><span class="line">3312</span><br><span class="line">3313</span><br><span class="line">3314</span><br><span class="line">3315</span><br><span class="line">3316</span><br><span class="line">3317</span><br><span class="line">3318</span><br><span class="line">3319</span><br><span class="line">3320</span><br><span class="line">3321</span><br><span class="line">3322</span><br><span class="line">3323</span><br><span class="line">3324</span><br><span class="line">3325</span><br><span class="line">3326</span><br><span class="line">3327</span><br><span class="line">3328</span><br><span class="line">3329</span><br><span class="line">3330</span><br><span class="line">3331</span><br><span class="line">3332</span><br><span class="line">3333</span><br><span class="line">3334</span><br><span class="line">3335</span><br><span class="line">3336</span><br><span class="line">3337</span><br><span class="line">3338</span><br><span class="line">3339</span><br><span class="line">3340</span><br><span class="line">3341</span><br><span class="line">3342</span><br><span class="line">3343</span><br><span class="line">3344</span><br><span class="line">3345</span><br><span class="line">3346</span><br><span class="line">3347</span><br><span class="line">3348</span><br><span class="line">3349</span><br><span class="line">3350</span><br><span class="line">3351</span><br><span class="line">3352</span><br><span class="line">3353</span><br><span class="line">3354</span><br><span class="line">3355</span><br><span class="line">3356</span><br><span class="line">3357</span><br><span class="line">3358</span><br><span class="line">3359</span><br><span class="line">3360</span><br><span class="line">3361</span><br><span class="line">3362</span><br><span class="line">3363</span><br><span class="line">3364</span><br><span class="line">3365</span><br><span class="line">3366</span><br><span class="line">3367</span><br><span class="line">3368</span><br><span class="line">3369</span><br><span class="line">3370</span><br><span class="line">3371</span><br><span class="line">3372</span><br><span class="line">3373</span><br><span class="line">3374</span><br><span class="line">3375</span><br><span class="line">3376</span><br><span class="line">3377</span><br><span class="line">3378</span><br><span class="line">3379</span><br><span class="line">3380</span><br><span class="line">3381</span><br><span class="line">3382</span><br><span class="line">3383</span><br><span class="line">3384</span><br><span class="line">3385</span><br><span class="line">3386</span><br><span class="line">3387</span><br><span class="line">3388</span><br><span class="line">3389</span><br><span class="line">3390</span><br><span class="line">3391</span><br><span class="line">3392</span><br><span class="line">3393</span><br><span class="line">3394</span><br><span class="line">3395</span><br><span class="line">3396</span><br><span class="line">3397</span><br><span class="line">3398</span><br><span class="line">3399</span><br><span class="line">3400</span><br><span class="line">3401</span><br><span class="line">3402</span><br><span class="line">3403</span><br><span class="line">3404</span><br><span class="line">3405</span><br><span class="line">3406</span><br><span class="line">3407</span><br><span class="line">3408</span><br><span class="line">3409</span><br><span class="line">3410</span><br><span class="line">3411</span><br><span class="line">3412</span><br><span class="line">3413</span><br><span class="line">3414</span><br><span class="line">3415</span><br><span class="line">3416</span><br><span class="line">3417</span><br><span class="line">3418</span><br><span class="line">3419</span><br><span class="line">3420</span><br><span class="line">3421</span><br><span class="line">3422</span><br><span class="line">3423</span><br><span class="line">3424</span><br><span class="line">3425</span><br><span class="line">3426</span><br><span class="line">3427</span><br><span class="line">3428</span><br><span class="line">3429</span><br><span class="line">3430</span><br><span class="line">3431</span><br><span class="line">3432</span><br><span class="line">3433</span><br><span class="line">3434</span><br><span class="line">3435</span><br><span class="line">3436</span><br><span class="line">3437</span><br><span class="line">3438</span><br><span class="line">3439</span><br><span class="line">3440</span><br><span class="line">3441</span><br><span class="line">3442</span><br><span class="line">3443</span><br><span class="line">3444</span><br><span class="line">3445</span><br><span class="line">3446</span><br><span class="line">3447</span><br><span class="line">3448</span><br><span class="line">3449</span><br><span class="line">3450</span><br><span class="line">3451</span><br><span class="line">3452</span><br><span class="line">3453</span><br><span class="line">3454</span><br><span class="line">3455</span><br><span class="line">3456</span><br><span class="line">3457</span><br><span class="line">3458</span><br><span class="line">3459</span><br><span class="line">3460</span><br><span class="line">3461</span><br><span class="line">3462</span><br><span class="line">3463</span><br><span class="line">3464</span><br><span class="line">3465</span><br><span class="line">3466</span><br><span class="line">3467</span><br><span class="line">3468</span><br><span class="line">3469</span><br><span class="line">3470</span><br><span class="line">3471</span><br><span class="line">3472</span><br><span class="line">3473</span><br><span class="line">3474</span><br><span class="line">3475</span><br><span class="line">3476</span><br><span class="line">3477</span><br><span class="line">3478</span><br><span class="line">3479</span><br><span class="line">3480</span><br><span class="line">3481</span><br><span class="line">3482</span><br><span class="line">3483</span><br><span class="line">3484</span><br><span class="line">3485</span><br><span class="line">3486</span><br><span class="line">3487</span><br><span class="line">3488</span><br><span class="line">3489</span><br><span class="line">3490</span><br><span class="line">3491</span><br><span class="line">3492</span><br><span class="line">3493</span><br><span class="line">3494</span><br><span class="line">3495</span><br><span class="line">3496</span><br><span class="line">3497</span><br><span class="line">3498</span><br><span class="line">3499</span><br><span class="line">3500</span><br><span class="line">3501</span><br><span class="line">3502</span><br><span class="line">3503</span><br><span class="line">3504</span><br><span class="line">3505</span><br><span class="line">3506</span><br><span class="line">3507</span><br><span class="line">3508</span><br><span class="line">3509</span><br><span class="line">3510</span><br><span class="line">3511</span><br><span class="line">3512</span><br><span class="line">3513</span><br><span class="line">3514</span><br><span class="line">3515</span><br><span class="line">3516</span><br><span class="line">3517</span><br><span class="line">3518</span><br><span class="line">3519</span><br><span class="line">3520</span><br><span class="line">3521</span><br><span class="line">3522</span><br><span class="line">3523</span><br><span class="line">3524</span><br><span class="line">3525</span><br><span class="line">3526</span><br><span class="line">3527</span><br><span class="line">3528</span><br><span class="line">3529</span><br><span class="line">3530</span><br><span class="line">3531</span><br><span class="line">3532</span><br><span class="line">3533</span><br><span class="line">3534</span><br><span class="line">3535</span><br><span class="line">3536</span><br><span class="line">3537</span><br><span class="line">3538</span><br><span class="line">3539</span><br><span class="line">3540</span><br><span class="line">3541</span><br><span class="line">3542</span><br><span class="line">3543</span><br><span class="line">3544</span><br><span class="line">3545</span><br><span class="line">3546</span><br><span class="line">3547</span><br><span class="line">3548</span><br><span class="line">3549</span><br><span class="line">3550</span><br><span class="line">3551</span><br><span class="line">3552</span><br><span class="line">3553</span><br><span class="line">3554</span><br><span class="line">3555</span><br><span class="line">3556</span><br><span class="line">3557</span><br><span class="line">3558</span><br><span class="line">3559</span><br><span class="line">3560</span><br><span class="line">3561</span><br><span class="line">3562</span><br><span class="line">3563</span><br><span class="line">3564</span><br><span class="line">3565</span><br><span class="line">3566</span><br><span class="line">3567</span><br><span class="line">3568</span><br><span class="line">3569</span><br><span class="line">3570</span><br><span class="line">3571</span><br><span class="line">3572</span><br><span class="line">3573</span><br><span class="line">3574</span><br><span class="line">3575</span><br><span class="line">3576</span><br><span class="line">3577</span><br><span class="line">3578</span><br><span class="line">3579</span><br><span class="line">3580</span><br><span class="line">3581</span><br><span class="line">3582</span><br><span class="line">3583</span><br><span class="line">3584</span><br><span class="line">3585</span><br><span class="line">3586</span><br><span class="line">3587</span><br><span class="line">3588</span><br><span class="line">3589</span><br><span class="line">3590</span><br><span class="line">3591</span><br><span class="line">3592</span><br><span class="line">3593</span><br><span class="line">3594</span><br><span class="line">3595</span><br><span class="line">3596</span><br><span class="line">3597</span><br><span class="line">3598</span><br><span class="line">3599</span><br><span class="line">3600</span><br><span class="line">3601</span><br><span class="line">3602</span><br><span class="line">3603</span><br><span class="line">3604</span><br><span class="line">3605</span><br><span class="line">3606</span><br><span class="line">3607</span><br><span class="line">3608</span><br><span class="line">3609</span><br><span class="line">3610</span><br><span class="line">3611</span><br><span class="line">3612</span><br><span class="line">3613</span><br><span class="line">3614</span><br><span class="line">3615</span><br><span class="line">3616</span><br><span class="line">3617</span><br><span class="line">3618</span><br><span class="line">3619</span><br><span class="line">3620</span><br><span class="line">3621</span><br><span class="line">3622</span><br><span class="line">3623</span><br><span class="line">3624</span><br><span class="line">3625</span><br><span class="line">3626</span><br><span class="line">3627</span><br><span class="line">3628</span><br><span class="line">3629</span><br><span class="line">3630</span><br><span class="line">3631</span><br><span class="line">3632</span><br><span class="line">3633</span><br><span class="line">3634</span><br><span class="line">3635</span><br><span class="line">3636</span><br><span class="line">3637</span><br><span class="line">3638</span><br><span class="line">3639</span><br><span class="line">3640</span><br><span class="line">3641</span><br><span class="line">3642</span><br><span class="line">3643</span><br><span class="line">3644</span><br><span class="line">3645</span><br><span class="line">3646</span><br><span class="line">3647</span><br><span class="line">3648</span><br><span class="line">3649</span><br><span class="line">3650</span><br><span class="line">3651</span><br><span class="line">3652</span><br><span class="line">3653</span><br><span class="line">3654</span><br><span class="line">3655</span><br><span class="line">3656</span><br><span class="line">3657</span><br><span class="line">3658</span><br><span class="line">3659</span><br><span class="line">3660</span><br><span class="line">3661</span><br><span class="line">3662</span><br><span class="line">3663</span><br><span class="line">3664</span><br><span class="line">3665</span><br><span class="line">3666</span><br><span class="line">3667</span><br><span class="line">3668</span><br><span class="line">3669</span><br><span class="line">3670</span><br><span class="line">3671</span><br><span class="line">3672</span><br><span class="line">3673</span><br><span class="line">3674</span><br><span class="line">3675</span><br><span class="line">3676</span><br><span class="line">3677</span><br><span class="line">3678</span><br><span class="line">3679</span><br><span class="line">3680</span><br><span class="line">3681</span><br><span class="line">3682</span><br><span class="line">3683</span><br><span class="line">3684</span><br><span class="line">3685</span><br><span class="line">3686</span><br><span class="line">3687</span><br><span class="line">3688</span><br><span class="line">3689</span><br><span class="line">3690</span><br><span class="line">3691</span><br><span class="line">3692</span><br><span class="line">3693</span><br><span class="line">3694</span><br><span class="line">3695</span><br><span class="line">3696</span><br><span class="line">3697</span><br><span class="line">3698</span><br><span class="line">3699</span><br><span class="line">3700</span><br><span class="line">3701</span><br><span class="line">3702</span><br><span class="line">3703</span><br><span class="line">3704</span><br><span class="line">3705</span><br><span class="line">3706</span><br><span class="line">3707</span><br><span class="line">3708</span><br><span class="line">3709</span><br><span class="line">3710</span><br><span class="line">3711</span><br><span class="line">3712</span><br><span class="line">3713</span><br><span class="line">3714</span><br><span class="line">3715</span><br><span class="line">3716</span><br><span class="line">3717</span><br><span class="line">3718</span><br><span class="line">3719</span><br><span class="line">3720</span><br><span class="line">3721</span><br><span class="line">3722</span><br><span class="line">3723</span><br><span class="line">3724</span><br><span class="line">3725</span><br><span class="line">3726</span><br><span class="line">3727</span><br><span class="line">3728</span><br><span class="line">3729</span><br><span class="line">3730</span><br><span class="line">3731</span><br><span class="line">3732</span><br><span class="line">3733</span><br><span class="line">3734</span><br><span class="line">3735</span><br><span class="line">3736</span><br><span class="line">3737</span><br><span class="line">3738</span><br><span class="line">3739</span><br><span class="line">3740</span><br><span class="line">3741</span><br><span class="line">3742</span><br><span class="line">3743</span><br><span class="line">3744</span><br><span class="line">3745</span><br><span class="line">3746</span><br><span class="line">3747</span><br><span class="line">3748</span><br><span class="line">3749</span><br><span class="line">3750</span><br><span class="line">3751</span><br><span class="line">3752</span><br><span class="line">3753</span><br><span class="line">3754</span><br><span class="line">3755</span><br><span class="line">3756</span><br><span class="line">3757</span><br><span class="line">3758</span><br><span class="line">3759</span><br><span class="line">3760</span><br><span class="line">3761</span><br><span class="line">3762</span><br><span class="line">3763</span><br><span class="line">3764</span><br><span class="line">3765</span><br><span class="line">3766</span><br><span class="line">3767</span><br><span class="line">3768</span><br><span class="line">3769</span><br><span class="line">3770</span><br><span class="line">3771</span><br><span class="line">3772</span><br><span class="line">3773</span><br><span class="line">3774</span><br><span class="line">3775</span><br><span class="line">3776</span><br><span class="line">3777</span><br><span class="line">3778</span><br><span class="line">3779</span><br><span class="line">3780</span><br><span class="line">3781</span><br><span class="line">3782</span><br><span class="line">3783</span><br><span class="line">3784</span><br><span class="line">3785</span><br><span class="line">3786</span><br><span class="line">3787</span><br><span class="line">3788</span><br><span class="line">3789</span><br><span class="line">3790</span><br><span class="line">3791</span><br><span class="line">3792</span><br><span class="line">3793</span><br><span class="line">3794</span><br><span class="line">3795</span><br><span class="line">3796</span><br><span class="line">3797</span><br><span class="line">3798</span><br><span class="line">3799</span><br><span class="line">3800</span><br><span class="line">3801</span><br><span class="line">3802</span><br><span class="line">3803</span><br><span class="line">3804</span><br><span class="line">3805</span><br><span class="line">3806</span><br><span class="line">3807</span><br><span class="line">3808</span><br><span class="line">3809</span><br><span class="line">3810</span><br><span class="line">3811</span><br><span class="line">3812</span><br><span class="line">3813</span><br><span class="line">3814</span><br><span class="line">3815</span><br><span class="line">3816</span><br><span class="line">3817</span><br><span class="line">3818</span><br><span class="line">3819</span><br><span class="line">3820</span><br><span class="line">3821</span><br><span class="line">3822</span><br><span class="line">3823</span><br><span class="line">3824</span><br><span class="line">3825</span><br><span class="line">3826</span><br><span class="line">3827</span><br><span class="line">3828</span><br><span class="line">3829</span><br><span class="line">3830</span><br><span class="line">3831</span><br><span class="line">3832</span><br><span class="line">3833</span><br><span class="line">3834</span><br><span class="line">3835</span><br><span class="line">3836</span><br><span class="line">3837</span><br><span class="line">3838</span><br><span class="line">3839</span><br><span class="line">3840</span><br><span class="line">3841</span><br><span class="line">3842</span><br><span class="line">3843</span><br><span class="line">3844</span><br><span class="line">3845</span><br><span class="line">3846</span><br><span class="line">3847</span><br><span class="line">3848</span><br><span class="line">3849</span><br><span class="line">3850</span><br><span class="line">3851</span><br><span class="line">3852</span><br><span class="line">3853</span><br><span class="line">3854</span><br><span class="line">3855</span><br><span class="line">3856</span><br><span class="line">3857</span><br><span class="line">3858</span><br><span class="line">3859</span><br><span class="line">3860</span><br><span class="line">3861</span><br><span class="line">3862</span><br><span class="line">3863</span><br><span class="line">3864</span><br><span class="line">3865</span><br><span class="line">3866</span><br><span class="line">3867</span><br><span class="line">3868</span><br><span class="line">3869</span><br><span class="line">3870</span><br><span class="line">3871</span><br><span class="line">3872</span><br><span class="line">3873</span><br><span class="line">3874</span><br><span class="line">3875</span><br><span class="line">3876</span><br><span class="line">3877</span><br><span class="line">3878</span><br><span class="line">3879</span><br><span class="line">3880</span><br><span class="line">3881</span><br><span class="line">3882</span><br><span class="line">3883</span><br><span class="line">3884</span><br><span class="line">3885</span><br><span class="line">3886</span><br><span class="line">3887</span><br><span class="line">3888</span><br><span class="line">3889</span><br><span class="line">3890</span><br><span class="line">3891</span><br><span class="line">3892</span><br><span class="line">3893</span><br><span class="line">3894</span><br><span class="line">3895</span><br><span class="line">3896</span><br><span class="line">3897</span><br><span class="line">3898</span><br><span class="line">3899</span><br><span class="line">3900</span><br><span class="line">3901</span><br><span class="line">3902</span><br><span class="line">3903</span><br><span class="line">3904</span><br><span class="line">3905</span><br><span class="line">3906</span><br><span class="line">3907</span><br><span class="line">3908</span><br><span class="line">3909</span><br><span class="line">3910</span><br><span class="line">3911</span><br><span class="line">3912</span><br><span class="line">3913</span><br><span class="line">3914</span><br><span class="line">3915</span><br><span class="line">3916</span><br><span class="line">3917</span><br><span class="line">3918</span><br><span class="line">3919</span><br><span class="line">3920</span><br><span class="line">3921</span><br><span class="line">3922</span><br><span class="line">3923</span><br><span class="line">3924</span><br><span class="line">3925</span><br><span class="line">3926</span><br><span class="line">3927</span><br><span class="line">3928</span><br><span class="line">3929</span><br><span class="line">3930</span><br><span class="line">3931</span><br><span class="line">3932</span><br><span class="line">3933</span><br><span class="line">3934</span><br><span class="line">3935</span><br><span class="line">3936</span><br><span class="line">3937</span><br><span class="line">3938</span><br><span class="line">3939</span><br><span class="line">3940</span><br><span class="line">3941</span><br><span class="line">3942</span><br><span class="line">3943</span><br><span class="line">3944</span><br><span class="line">3945</span><br><span class="line">3946</span><br><span class="line">3947</span><br><span class="line">3948</span><br><span class="line">3949</span><br><span class="line">3950</span><br><span class="line">3951</span><br><span class="line">3952</span><br><span class="line">3953</span><br><span class="line">3954</span><br><span class="line">3955</span><br><span class="line">3956</span><br><span class="line">3957</span><br><span class="line">3958</span><br><span class="line">3959</span><br><span class="line">3960</span><br><span class="line">3961</span><br><span class="line">3962</span><br><span class="line">3963</span><br><span class="line">3964</span><br><span class="line">3965</span><br><span class="line">3966</span><br><span class="line">3967</span><br><span class="line">3968</span><br><span class="line">3969</span><br><span class="line">3970</span><br><span class="line">3971</span><br><span class="line">3972</span><br><span class="line">3973</span><br><span class="line">3974</span><br><span class="line">3975</span><br><span class="line">3976</span><br><span class="line">3977</span><br><span class="line">3978</span><br><span class="line">3979</span><br><span class="line">3980</span><br><span class="line">3981</span><br><span class="line">3982</span><br><span class="line">3983</span><br><span class="line">3984</span><br><span class="line">3985</span><br><span class="line">3986</span><br><span class="line">3987</span><br><span class="line">3988</span><br><span class="line">3989</span><br><span class="line">3990</span><br><span class="line">3991</span><br><span class="line">3992</span><br><span class="line">3993</span><br><span class="line">3994</span><br><span class="line">3995</span><br><span class="line">3996</span><br><span class="line">3997</span><br><span class="line">3998</span><br><span class="line">3999</span><br><span class="line">4000</span><br><span class="line">4001</span><br><span class="line">4002</span><br><span class="line">4003</span><br><span class="line">4004</span><br><span class="line">4005</span><br><span class="line">4006</span><br><span class="line">4007</span><br><span class="line">4008</span><br><span class="line">4009</span><br><span class="line">4010</span><br><span class="line">4011</span><br><span class="line">4012</span><br><span class="line">4013</span><br><span class="line">4014</span><br><span class="line">4015</span><br><span class="line">4016</span><br><span class="line">4017</span><br><span class="line">4018</span><br><span class="line">4019</span><br><span class="line">4020</span><br><span class="line">4021</span><br><span class="line">4022</span><br><span class="line">4023</span><br><span class="line">4024</span><br><span class="line">4025</span><br><span class="line">4026</span><br><span class="line">4027</span><br><span class="line">4028</span><br><span class="line">4029</span><br><span class="line">4030</span><br><span class="line">4031</span><br><span class="line">4032</span><br><span class="line">4033</span><br><span class="line">4034</span><br><span class="line">4035</span><br><span class="line">4036</span><br><span class="line">4037</span><br><span class="line">4038</span><br><span class="line">4039</span><br><span class="line">4040</span><br><span class="line">4041</span><br><span class="line">4042</span><br><span class="line">4043</span><br><span class="line">4044</span><br><span class="line">4045</span><br><span class="line">4046</span><br><span class="line">4047</span><br><span class="line">4048</span><br><span class="line">4049</span><br><span class="line">4050</span><br><span class="line">4051</span><br><span class="line">4052</span><br><span class="line">4053</span><br><span class="line">4054</span><br><span class="line">4055</span><br><span class="line">4056</span><br><span class="line">4057</span><br><span class="line">4058</span><br><span class="line">4059</span><br><span class="line">4060</span><br><span class="line">4061</span><br><span class="line">4062</span><br><span class="line">4063</span><br><span class="line">4064</span><br><span class="line">4065</span><br><span class="line">4066</span><br><span class="line">4067</span><br><span class="line">4068</span><br><span class="line">4069</span><br><span class="line">4070</span><br><span class="line">4071</span><br><span class="line">4072</span><br><span class="line">4073</span><br><span class="line">4074</span><br><span class="line">4075</span><br><span class="line">4076</span><br><span class="line">4077</span><br><span class="line">4078</span><br><span class="line">4079</span><br><span class="line">4080</span><br><span class="line">4081</span><br><span class="line">4082</span><br><span class="line">4083</span><br><span class="line">4084</span><br><span class="line">4085</span><br><span class="line">4086</span><br><span class="line">4087</span><br><span class="line">4088</span><br><span class="line">4089</span><br><span class="line">4090</span><br><span class="line">4091</span><br><span class="line">4092</span><br><span class="line">4093</span><br><span class="line">4094</span><br><span class="line">4095</span><br><span class="line">4096</span><br><span class="line">4097</span><br><span class="line">4098</span><br><span class="line">4099</span><br><span class="line">4100</span><br><span class="line">4101</span><br><span class="line">4102</span><br><span class="line">4103</span><br><span class="line">4104</span><br><span class="line">4105</span><br><span class="line">4106</span><br><span class="line">4107</span><br><span class="line">4108</span><br><span class="line">4109</span><br><span class="line">4110</span><br><span class="line">4111</span><br><span class="line">4112</span><br><span class="line">4113</span><br><span class="line">4114</span><br><span class="line">4115</span><br><span class="line">4116</span><br><span class="line">4117</span><br><span class="line">4118</span><br><span class="line">4119</span><br><span class="line">4120</span><br><span class="line">4121</span><br><span class="line">4122</span><br><span class="line">4123</span><br><span class="line">4124</span><br><span class="line">4125</span><br><span class="line">4126</span><br><span class="line">4127</span><br><span class="line">4128</span><br><span class="line">4129</span><br><span class="line">4130</span><br><span class="line">4131</span><br><span class="line">4132</span><br><span class="line">4133</span><br><span class="line">4134</span><br><span class="line">4135</span><br><span class="line">4136</span><br><span class="line">4137</span><br><span class="line">4138</span><br><span class="line">4139</span><br><span class="line">4140</span><br><span class="line">4141</span><br><span class="line">4142</span><br><span class="line">4143</span><br><span class="line">4144</span><br><span class="line">4145</span><br><span class="line">4146</span><br><span class="line">4147</span><br><span class="line">4148</span><br><span class="line">4149</span><br><span class="line">4150</span><br><span class="line">4151</span><br><span class="line">4152</span><br><span class="line">4153</span><br><span class="line">4154</span><br><span class="line">4155</span><br><span class="line">4156</span><br><span class="line">4157</span><br><span class="line">4158</span><br><span class="line">4159</span><br><span class="line">4160</span><br><span class="line">4161</span><br><span class="line">4162</span><br><span class="line">4163</span><br><span class="line">4164</span><br><span class="line">4165</span><br><span class="line">4166</span><br><span class="line">4167</span><br><span class="line">4168</span><br><span class="line">4169</span><br><span class="line">4170</span><br><span class="line">4171</span><br><span class="line">4172</span><br><span class="line">4173</span><br><span class="line">4174</span><br><span class="line">4175</span><br><span class="line">4176</span><br><span class="line">4177</span><br><span class="line">4178</span><br><span class="line">4179</span><br><span class="line">4180</span><br><span class="line">4181</span><br><span class="line">4182</span><br><span class="line">4183</span><br><span class="line">4184</span><br><span class="line">4185</span><br><span class="line">4186</span><br><span class="line">4187</span><br><span class="line">4188</span><br><span class="line">4189</span><br><span class="line">4190</span><br><span class="line">4191</span><br><span class="line">4192</span><br><span class="line">4193</span><br><span class="line">4194</span><br><span class="line">4195</span><br><span class="line">4196</span><br><span class="line">4197</span><br><span class="line">4198</span><br><span class="line">4199</span><br><span class="line">4200</span><br><span class="line">4201</span><br><span class="line">4202</span><br><span class="line">4203</span><br><span class="line">4204</span><br><span class="line">4205</span><br><span class="line">4206</span><br><span class="line">4207</span><br><span class="line">4208</span><br><span class="line">4209</span><br><span class="line">4210</span><br><span class="line">4211</span><br><span class="line">4212</span><br><span class="line">4213</span><br><span class="line">4214</span><br><span class="line">4215</span><br><span class="line">4216</span><br><span class="line">4217</span><br><span class="line">4218</span><br><span class="line">4219</span><br><span class="line">4220</span><br><span class="line">4221</span><br><span class="line">4222</span><br><span class="line">4223</span><br><span class="line">4224</span><br><span class="line">4225</span><br><span class="line">4226</span><br><span class="line">4227</span><br><span class="line">4228</span><br><span class="line">4229</span><br><span class="line">4230</span><br><span class="line">4231</span><br><span class="line">4232</span><br><span class="line">4233</span><br><span class="line">4234</span><br><span class="line">4235</span><br><span class="line">4236</span><br><span class="line">4237</span><br><span class="line">4238</span><br><span class="line">4239</span><br><span class="line">4240</span><br><span class="line">4241</span><br><span class="line">4242</span><br><span class="line">4243</span><br><span class="line">4244</span><br><span class="line">4245</span><br><span class="line">4246</span><br><span class="line">4247</span><br><span class="line">4248</span><br><span class="line">4249</span><br><span class="line">4250</span><br><span class="line">4251</span><br><span class="line">4252</span><br><span class="line">4253</span><br><span class="line">4254</span><br><span class="line">4255</span><br><span class="line">4256</span><br><span class="line">4257</span><br><span class="line">4258</span><br><span class="line">4259</span><br><span class="line">4260</span><br><span class="line">4261</span><br><span class="line">4262</span><br><span class="line">4263</span><br><span class="line">4264</span><br><span class="line">4265</span><br><span class="line">4266</span><br><span class="line">4267</span><br><span class="line">4268</span><br><span class="line">4269</span><br><span class="line">4270</span><br><span class="line">4271</span><br><span class="line">4272</span><br><span class="line">4273</span><br><span class="line">4274</span><br><span class="line">4275</span><br><span class="line">4276</span><br><span class="line">4277</span><br><span class="line">4278</span><br><span class="line">4279</span><br><span class="line">4280</span><br><span class="line">4281</span><br><span class="line">4282</span><br><span class="line">4283</span><br><span class="line">4284</span><br><span class="line">4285</span><br><span class="line">4286</span><br><span class="line">4287</span><br><span class="line">4288</span><br><span class="line">4289</span><br><span class="line">4290</span><br><span class="line">4291</span><br><span class="line">4292</span><br><span class="line">4293</span><br><span class="line">4294</span><br><span class="line">4295</span><br><span class="line">4296</span><br><span class="line">4297</span><br><span class="line">4298</span><br><span class="line">4299</span><br><span class="line">4300</span><br><span class="line">4301</span><br><span class="line">4302</span><br><span class="line">4303</span><br><span class="line">4304</span><br><span class="line">4305</span><br><span class="line">4306</span><br><span class="line">4307</span><br><span class="line">4308</span><br><span class="line">4309</span><br><span class="line">4310</span><br><span class="line">4311</span><br><span class="line">4312</span><br><span class="line">4313</span><br><span class="line">4314</span><br><span class="line">4315</span><br><span class="line">4316</span><br><span class="line">4317</span><br><span class="line">4318</span><br><span class="line">4319</span><br><span class="line">4320</span><br><span class="line">4321</span><br><span class="line">4322</span><br><span class="line">4323</span><br><span class="line">4324</span><br><span class="line">4325</span><br><span class="line">4326</span><br><span class="line">4327</span><br><span class="line">4328</span><br><span class="line">4329</span><br><span class="line">4330</span><br><span class="line">4331</span><br><span class="line">4332</span><br><span class="line">4333</span><br><span class="line">4334</span><br><span class="line">4335</span><br><span class="line">4336</span><br><span class="line">4337</span><br><span class="line">4338</span><br><span class="line">4339</span><br><span class="line">4340</span><br><span class="line">4341</span><br><span class="line">4342</span><br><span class="line">4343</span><br><span class="line">4344</span><br><span class="line">4345</span><br><span class="line">4346</span><br><span class="line">4347</span><br><span class="line">4348</span><br><span class="line">4349</span><br><span class="line">4350</span><br><span class="line">4351</span><br><span class="line">4352</span><br><span class="line">4353</span><br><span class="line">4354</span><br><span class="line">4355</span><br><span class="line">4356</span><br><span class="line">4357</span><br><span class="line">4358</span><br><span class="line">4359</span><br><span class="line">4360</span><br><span class="line">4361</span><br><span class="line">4362</span><br><span class="line">4363</span><br><span class="line">4364</span><br><span class="line">4365</span><br><span class="line">4366</span><br><span class="line">4367</span><br><span class="line">4368</span><br><span class="line">4369</span><br><span class="line">4370</span><br><span class="line">4371</span><br><span class="line">4372</span><br><span class="line">4373</span><br><span class="line">4374</span><br><span class="line">4375</span><br><span class="line">4376</span><br><span class="line">4377</span><br><span class="line">4378</span><br><span class="line">4379</span><br><span class="line">4380</span><br><span class="line">4381</span><br><span class="line">4382</span><br><span class="line">4383</span><br><span class="line">4384</span><br><span class="line">4385</span><br><span class="line">4386</span><br><span class="line">4387</span><br><span class="line">4388</span><br><span class="line">4389</span><br><span class="line">4390</span><br><span class="line">4391</span><br><span class="line">4392</span><br><span class="line">4393</span><br><span class="line">4394</span><br><span class="line">4395</span><br><span class="line">4396</span><br><span class="line">4397</span><br><span class="line">4398</span><br><span class="line">4399</span><br><span class="line">4400</span><br><span class="line">4401</span><br><span class="line">4402</span><br><span class="line">4403</span><br><span class="line">4404</span><br><span class="line">4405</span><br><span class="line">4406</span><br><span class="line">4407</span><br><span class="line">4408</span><br><span class="line">4409</span><br><span class="line">4410</span><br><span class="line">4411</span><br><span class="line">4412</span><br><span class="line">4413</span><br><span class="line">4414</span><br><span class="line">4415</span><br><span class="line">4416</span><br><span class="line">4417</span><br><span class="line">4418</span><br><span class="line">4419</span><br><span class="line">4420</span><br><span class="line">4421</span><br><span class="line">4422</span><br><span class="line">4423</span><br><span class="line">4424</span><br><span class="line">4425</span><br><span class="line">4426</span><br><span class="line">4427</span><br><span class="line">4428</span><br><span class="line">4429</span><br><span class="line">4430</span><br><span class="line">4431</span><br><span class="line">4432</span><br><span class="line">4433</span><br><span class="line">4434</span><br><span class="line">4435</span><br><span class="line">4436</span><br><span class="line">4437</span><br><span class="line">4438</span><br><span class="line">4439</span><br><span class="line">4440</span><br><span class="line">4441</span><br><span class="line">4442</span><br><span class="line">4443</span><br><span class="line">4444</span><br><span class="line">4445</span><br><span class="line">4446</span><br><span class="line">4447</span><br><span class="line">4448</span><br><span class="line">4449</span><br><span class="line">4450</span><br><span class="line">4451</span><br><span class="line">4452</span><br><span class="line">4453</span><br><span class="line">4454</span><br><span class="line">4455</span><br><span class="line">4456</span><br><span class="line">4457</span><br><span class="line">4458</span><br><span class="line">4459</span><br><span class="line">4460</span><br><span class="line">4461</span><br><span class="line">4462</span><br><span class="line">4463</span><br><span class="line">4464</span><br><span class="line">4465</span><br><span class="line">4466</span><br><span class="line">4467</span><br><span class="line">4468</span><br><span class="line">4469</span><br><span class="line">4470</span><br><span class="line">4471</span><br><span class="line">4472</span><br><span class="line">4473</span><br><span class="line">4474</span><br><span class="line">4475</span><br><span class="line">4476</span><br><span class="line">4477</span><br><span class="line">4478</span><br><span class="line">4479</span><br><span class="line">4480</span><br><span class="line">4481</span><br><span class="line">4482</span><br><span class="line">4483</span><br><span class="line">4484</span><br><span class="line">4485</span><br><span class="line">4486</span><br><span class="line">4487</span><br><span class="line">4488</span><br><span class="line">4489</span><br><span class="line">4490</span><br><span class="line">4491</span><br><span class="line">4492</span><br><span class="line">4493</span><br><span class="line">4494</span><br><span class="line">4495</span><br><span class="line">4496</span><br><span class="line">4497</span><br><span class="line">4498</span><br><span class="line">4499</span><br><span class="line">4500</span><br><span class="line">4501</span><br><span class="line">4502</span><br><span class="line">4503</span><br><span class="line">4504</span><br><span class="line">4505</span><br><span class="line">4506</span><br><span class="line">4507</span><br><span class="line">4508</span><br><span class="line">4509</span><br><span class="line">4510</span><br><span class="line">4511</span><br><span class="line">4512</span><br><span class="line">4513</span><br><span class="line">4514</span><br><span class="line">4515</span><br><span class="line">4516</span><br><span class="line">4517</span><br><span class="line">4518</span><br><span class="line">4519</span><br><span class="line">4520</span><br><span class="line">4521</span><br><span class="line">4522</span><br><span class="line">4523</span><br><span class="line">4524</span><br><span class="line">4525</span><br><span class="line">4526</span><br><span class="line">4527</span><br><span class="line">4528</span><br><span class="line">4529</span><br><span class="line">4530</span><br><span class="line">4531</span><br><span class="line">4532</span><br><span class="line">4533</span><br><span class="line">4534</span><br><span class="line">4535</span><br><span class="line">4536</span><br><span class="line">4537</span><br><span class="line">4538</span><br><span class="line">4539</span><br><span class="line">4540</span><br><span class="line">4541</span><br><span class="line">4542</span><br><span class="line">4543</span><br><span class="line">4544</span><br><span class="line">4545</span><br><span class="line">4546</span><br><span class="line">4547</span><br><span class="line">4548</span><br><span class="line">4549</span><br><span class="line">4550</span><br><span class="line">4551</span><br><span class="line">4552</span><br><span class="line">4553</span><br><span class="line">4554</span><br><span class="line">4555</span><br><span class="line">4556</span><br><span class="line">4557</span><br><span class="line">4558</span><br><span class="line">4559</span><br><span class="line">4560</span><br><span class="line">4561</span><br><span class="line">4562</span><br><span class="line">4563</span><br><span class="line">4564</span><br><span class="line">4565</span><br><span class="line">4566</span><br><span class="line">4567</span><br><span class="line">4568</span><br><span class="line">4569</span><br><span class="line">4570</span><br><span class="line">4571</span><br><span class="line">4572</span><br><span class="line">4573</span><br><span class="line">4574</span><br><span class="line">4575</span><br><span class="line">4576</span><br><span class="line">4577</span><br><span class="line">4578</span><br><span class="line">4579</span><br><span class="line">4580</span><br><span class="line">4581</span><br><span class="line">4582</span><br><span class="line">4583</span><br><span class="line">4584</span><br><span class="line">4585</span><br><span class="line">4586</span><br><span class="line">4587</span><br><span class="line">4588</span><br><span class="line">4589</span><br><span class="line">4590</span><br><span class="line">4591</span><br><span class="line">4592</span><br><span class="line">4593</span><br><span class="line">4594</span><br><span class="line">4595</span><br><span class="line">4596</span><br><span class="line">4597</span><br><span class="line">4598</span><br><span class="line">4599</span><br><span class="line">4600</span><br><span class="line">4601</span><br><span class="line">4602</span><br><span class="line">4603</span><br><span class="line">4604</span><br><span class="line">4605</span><br><span class="line">4606</span><br><span class="line">4607</span><br><span class="line">4608</span><br><span class="line">4609</span><br><span class="line">4610</span><br><span class="line">4611</span><br><span class="line">4612</span><br><span class="line">4613</span><br><span class="line">4614</span><br><span class="line">4615</span><br><span class="line">4616</span><br><span class="line">4617</span><br><span class="line">4618</span><br><span class="line">4619</span><br><span class="line">4620</span><br><span class="line">4621</span><br><span class="line">4622</span><br><span class="line">4623</span><br><span class="line">4624</span><br><span class="line">4625</span><br><span class="line">4626</span><br><span class="line">4627</span><br><span class="line">4628</span><br><span class="line">4629</span><br><span class="line">4630</span><br><span class="line">4631</span><br><span class="line">4632</span><br><span class="line">4633</span><br><span class="line">4634</span><br><span class="line">4635</span><br><span class="line">4636</span><br><span class="line">4637</span><br><span class="line">4638</span><br><span class="line">4639</span><br><span class="line">4640</span><br><span class="line">4641</span><br><span class="line">4642</span><br><span class="line">4643</span><br><span class="line">4644</span><br><span class="line">4645</span><br><span class="line">4646</span><br><span class="line">4647</span><br><span class="line">4648</span><br><span class="line">4649</span><br><span class="line">4650</span><br><span class="line">4651</span><br><span class="line">4652</span><br><span class="line">4653</span><br><span class="line">4654</span><br><span class="line">4655</span><br><span class="line">4656</span><br><span class="line">4657</span><br><span class="line">4658</span><br><span class="line">4659</span><br><span class="line">4660</span><br><span class="line">4661</span><br><span class="line">4662</span><br><span class="line">4663</span><br><span class="line">4664</span><br><span class="line">4665</span><br><span class="line">4666</span><br><span class="line">4667</span><br><span class="line">4668</span><br><span class="line">4669</span><br><span class="line">4670</span><br><span class="line">4671</span><br><span class="line">4672</span><br><span class="line">4673</span><br><span class="line">4674</span><br><span class="line">4675</span><br><span class="line">4676</span><br><span class="line">4677</span><br><span class="line">4678</span><br><span class="line">4679</span><br><span class="line">4680</span><br><span class="line">4681</span><br><span class="line">4682</span><br><span class="line">4683</span><br><span class="line">4684</span><br><span class="line">4685</span><br><span class="line">4686</span><br><span class="line">4687</span><br><span class="line">4688</span><br><span class="line">4689</span><br><span class="line">4690</span><br><span class="line">4691</span><br><span class="line">4692</span><br><span class="line">4693</span><br><span class="line">4694</span><br><span class="line">4695</span><br><span class="line">4696</span><br><span class="line">4697</span><br><span class="line">4698</span><br><span class="line">4699</span><br><span class="line">4700</span><br><span class="line">4701</span><br><span class="line">4702</span><br><span class="line">4703</span><br><span class="line">4704</span><br><span class="line">4705</span><br><span class="line">4706</span><br><span class="line">4707</span><br><span class="line">4708</span><br><span class="line">4709</span><br><span class="line">4710</span><br><span class="line">4711</span><br><span class="line">4712</span><br><span class="line">4713</span><br><span class="line">4714</span><br><span class="line">4715</span><br><span class="line">4716</span><br><span class="line">4717</span><br><span class="line">4718</span><br><span class="line">4719</span><br><span class="line">4720</span><br><span class="line">4721</span><br><span class="line">4722</span><br><span class="line">4723</span><br><span class="line">4724</span><br><span class="line">4725</span><br><span class="line">4726</span><br><span class="line">4727</span><br><span class="line">4728</span><br><span class="line">4729</span><br><span class="line">4730</span><br><span class="line">4731</span><br><span class="line">4732</span><br><span class="line">4733</span><br><span class="line">4734</span><br><span class="line">4735</span><br><span class="line">4736</span><br><span class="line">4737</span><br><span class="line">4738</span><br><span class="line">4739</span><br><span class="line">4740</span><br><span class="line">4741</span><br><span class="line">4742</span><br><span class="line">4743</span><br><span class="line">4744</span><br><span class="line">4745</span><br><span class="line">4746</span><br><span class="line">4747</span><br><span class="line">4748</span><br><span class="line">4749</span><br><span class="line">4750</span><br><span class="line">4751</span><br><span class="line">4752</span><br><span class="line">4753</span><br><span class="line">4754</span><br><span class="line">4755</span><br><span class="line">4756</span><br><span class="line">4757</span><br><span class="line">4758</span><br><span class="line">4759</span><br><span class="line">4760</span><br><span class="line">4761</span><br><span class="line">4762</span><br><span class="line">4763</span><br><span class="line">4764</span><br><span class="line">4765</span><br><span class="line">4766</span><br><span class="line">4767</span><br><span class="line">4768</span><br><span class="line">4769</span><br><span class="line">4770</span><br><span class="line">4771</span><br><span class="line">4772</span><br><span class="line">4773</span><br><span class="line">4774</span><br><span class="line">4775</span><br><span class="line">4776</span><br><span class="line">4777</span><br><span class="line">4778</span><br><span class="line">4779</span><br><span class="line">4780</span><br><span class="line">4781</span><br><span class="line">4782</span><br><span class="line">4783</span><br><span class="line">4784</span><br><span class="line">4785</span><br><span class="line">4786</span><br><span class="line">4787</span><br><span class="line">4788</span><br><span class="line">4789</span><br><span class="line">4790</span><br><span class="line">4791</span><br><span class="line">4792</span><br><span class="line">4793</span><br><span class="line">4794</span><br><span class="line">4795</span><br><span class="line">4796</span><br><span class="line">4797</span><br><span class="line">4798</span><br><span class="line">4799</span><br><span class="line">4800</span><br><span class="line">4801</span><br><span class="line">4802</span><br><span class="line">4803</span><br><span class="line">4804</span><br><span class="line">4805</span><br><span class="line">4806</span><br><span class="line">4807</span><br><span class="line">4808</span><br><span class="line">4809</span><br><span class="line">4810</span><br><span class="line">4811</span><br><span class="line">4812</span><br><span class="line">4813</span><br><span class="line">4814</span><br><span class="line">4815</span><br><span class="line">4816</span><br><span class="line">4817</span><br><span class="line">4818</span><br><span class="line">4819</span><br><span class="line">4820</span><br><span class="line">4821</span><br><span class="line">4822</span><br></pre></td><td class="code"><pre><span class="line">&lt;?php</span><br><span class="line">/**</span><br><span class="line"> * PHPMailer - PHP email creation and transport class.</span><br><span class="line"> * PHP SystemVersion 5.5.</span><br><span class="line"> *</span><br><span class="line"> * @see https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project</span><br><span class="line"> *</span><br><span class="line"> * @author    Marcus Bointon (Synchro/coolbru) &lt;phpmailer@synchromedia.co.uk&gt;</span><br><span class="line"> * @author    Jim Jagielski (jimjag) &lt;jimjag@gmail.com&gt;</span><br><span class="line"> * @author    Andy Prevost (codeworxtech) &lt;codeworxtech@users.sourceforge.net&gt;</span><br><span class="line"> * @author    Brent R. Matzelle (original founder)</span><br><span class="line"> * @copyright 2012 - 2019 Marcus Bointon</span><br><span class="line"> * @copyright 2010 - 2012 Jim Jagielski</span><br><span class="line"> * @copyright 2004 - 2009 Andy Prevost</span><br><span class="line"> * @license   http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License</span><br><span class="line"> * @note      This program is distributed <span class="keyword">in</span> the hope that it will be useful - WITHOUT</span><br><span class="line"> * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or</span><br><span class="line"> * FITNESS FOR A PARTICULAR PURPOSE.</span><br><span class="line"> */</span><br><span class="line"></span><br><span class="line">namespace phpmailer;</span><br><span class="line">/**</span><br><span class="line"> * PHPMailer - PHP email creation and transport class.</span><br><span class="line"> *</span><br><span class="line"> * @author Marcus Bointon (Synchro/coolbru) &lt;phpmailer@synchromedia.co.uk&gt;</span><br><span class="line"> * @author Jim Jagielski (jimjag) &lt;jimjag@gmail.com&gt;</span><br><span class="line"> * @author Andy Prevost (codeworxtech) &lt;codeworxtech@users.sourceforge.net&gt;</span><br><span class="line"> * @author Brent R. Matzelle (original founder)</span><br><span class="line"> */</span><br><span class="line">class PHPMailer</span><br><span class="line">&#123;</span><br><span class="line">    const CHARSET_ASCII = <span class="string">&#x27;us-ascii&#x27;</span>;</span><br><span class="line">    const CHARSET_ISO88591 = <span class="string">&#x27;iso-8859-1&#x27;</span>;</span><br><span class="line">    const CHARSET_UTF8 = <span class="string">&#x27;utf-8&#x27;</span>;</span><br><span class="line"></span><br><span class="line">    const CONTENT_TYPE_PLAINTEXT = <span class="string">&#x27;text/plain&#x27;</span>;</span><br><span class="line">    const CONTENT_TYPE_TEXT_CALENDAR = <span class="string">&#x27;text/calendar&#x27;</span>;</span><br><span class="line">    const CONTENT_TYPE_TEXT_HTML = <span class="string">&#x27;text/html&#x27;</span>;</span><br><span class="line">    const CONTENT_TYPE_MULTIPART_ALTERNATIVE = <span class="string">&#x27;multipart/alternative&#x27;</span>;</span><br><span class="line">    const CONTENT_TYPE_MULTIPART_MIXED = <span class="string">&#x27;multipart/mixed&#x27;</span>;</span><br><span class="line">    const CONTENT_TYPE_MULTIPART_RELATED = <span class="string">&#x27;multipart/related&#x27;</span>;</span><br><span class="line"></span><br><span class="line">    const ENCODING_7BIT = <span class="string">&#x27;7bit&#x27;</span>;</span><br><span class="line">    const ENCODING_8BIT = <span class="string">&#x27;8bit&#x27;</span>;</span><br><span class="line">    const ENCODING_BASE64 = <span class="string">&#x27;base64&#x27;</span>;</span><br><span class="line">    const ENCODING_BINARY = <span class="string">&#x27;binary&#x27;</span>;</span><br><span class="line">    const ENCODING_QUOTED_PRINTABLE = <span class="string">&#x27;quoted-printable&#x27;</span>;</span><br><span class="line"></span><br><span class="line">    const ENCRYPTION_STARTTLS = <span class="string">&#x27;tls&#x27;</span>;</span><br><span class="line">    const ENCRYPTION_SMTPS = <span class="string">&#x27;ssl&#x27;</span>;</span><br><span class="line"></span><br><span class="line">    const ICAL_METHOD_REQUEST = <span class="string">&#x27;REQUEST&#x27;</span>;</span><br><span class="line">    const ICAL_METHOD_PUBLISH = <span class="string">&#x27;PUBLISH&#x27;</span>;</span><br><span class="line">    const ICAL_METHOD_REPLY = <span class="string">&#x27;REPLY&#x27;</span>;</span><br><span class="line">    const ICAL_METHOD_ADD = <span class="string">&#x27;ADD&#x27;</span>;</span><br><span class="line">    const ICAL_METHOD_CANCEL = <span class="string">&#x27;CANCEL&#x27;</span>;</span><br><span class="line">    const ICAL_METHOD_REFRESH = <span class="string">&#x27;REFRESH&#x27;</span>;</span><br><span class="line">    const ICAL_METHOD_COUNTER = <span class="string">&#x27;COUNTER&#x27;</span>;</span><br><span class="line">    const ICAL_METHOD_DECLINECOUNTER = <span class="string">&#x27;DECLINECOUNTER&#x27;</span>;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Email priority.</span><br><span class="line">     * Options: null (default), 1 = High, 3 = Normal, 5 = low.</span><br><span class="line">     * When null, the header is not <span class="built_in">set</span> at all.</span><br><span class="line">     *</span><br><span class="line">     * @var int|null</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$Priority</span>;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * The character <span class="built_in">set</span> of the message.</span><br><span class="line">     *</span><br><span class="line">     * @var string</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$CharSet</span> = self::CHARSET_ISO88591;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * The MIME Content-<span class="built_in">type</span> of the message.</span><br><span class="line">     *</span><br><span class="line">     * @var string</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$ContentType</span> = self::CONTENT_TYPE_PLAINTEXT;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * The message encoding.</span><br><span class="line">     * Options: <span class="string">&quot;8bit&quot;</span>, <span class="string">&quot;7bit&quot;</span>, <span class="string">&quot;binary&quot;</span>, <span class="string">&quot;base64&quot;</span>, and <span class="string">&quot;quoted-printable&quot;</span>.</span><br><span class="line">     *</span><br><span class="line">     * @var string</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$Encoding</span> = self::ENCODING_8BIT;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Holds the most recent mailer error message.</span><br><span class="line">     *</span><br><span class="line">     * @var string</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$ErrorInfo</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * The From email address <span class="keyword">for</span> the message.</span><br><span class="line">     *</span><br><span class="line">     * @var string</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$From</span> = <span class="string">&#x27;root@localhost&#x27;</span>;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * The From name of the message.</span><br><span class="line">     *</span><br><span class="line">     * @var string</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$FromName</span> = <span class="string">&#x27;Root User&#x27;</span>;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * The envelope sender of the message.</span><br><span class="line">     * This will usually be turned into a Return-Path header by the receiver,</span><br><span class="line">     * and is the address that bounces will be sent to.</span><br><span class="line">     * If not empty, will be passed via `-f` to sendmail or as the <span class="string">&#x27;MAIL FROM&#x27;</span> value over SMTP.</span><br><span class="line">     *</span><br><span class="line">     * @var string</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$Sender</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * The Subject of the message.</span><br><span class="line">     *</span><br><span class="line">     * @var string</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$Subject</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * An HTML or plain text message body.</span><br><span class="line">     * If HTML <span class="keyword">then</span> call isHTML(<span class="literal">true</span>).</span><br><span class="line">     *</span><br><span class="line">     * @var string</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$Body</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * The plain-text message body.</span><br><span class="line">     * This body can be <span class="built_in">read</span> by mail clients that <span class="keyword">do</span> not have HTML email</span><br><span class="line">     * capability such as mutt &amp; Eudora.</span><br><span class="line">     * Clients that can <span class="built_in">read</span> HTML will view the normal Body.</span><br><span class="line">     *</span><br><span class="line">     * @var string</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$AltBody</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * An iCal message part body.</span><br><span class="line">     * Only supported <span class="keyword">in</span> simple alt or alt_inline message types</span><br><span class="line">     * To generate iCal event structures, use classes like EasyPeasyICS or iCalcreator.</span><br><span class="line">     *</span><br><span class="line">     * @see http://sprain.ch/blog/downloads/php-class-easypeasyics-create-ical-files-with-php/</span><br><span class="line">     * @see http://kigkonsult.se/iCalcreator/</span><br><span class="line">     *</span><br><span class="line">     * @var string</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$Ical</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Value-array of <span class="string">&quot;method&quot;</span> <span class="keyword">in</span> Contenttype header <span class="string">&quot;text/calendar&quot;</span></span><br><span class="line">     *</span><br><span class="line">     * @var string[]</span><br><span class="line">     */</span><br><span class="line">    protected static <span class="variable">$IcalMethods</span> = [</span><br><span class="line">        self::ICAL_METHOD_REQUEST,</span><br><span class="line">        self::ICAL_METHOD_PUBLISH,</span><br><span class="line">        self::ICAL_METHOD_REPLY,</span><br><span class="line">        self::ICAL_METHOD_ADD,</span><br><span class="line">        self::ICAL_METHOD_CANCEL,</span><br><span class="line">        self::ICAL_METHOD_REFRESH,</span><br><span class="line">        self::ICAL_METHOD_COUNTER,</span><br><span class="line">        self::ICAL_METHOD_DECLINECOUNTER,</span><br><span class="line">    ];</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * The complete compiled MIME message body.</span><br><span class="line">     *</span><br><span class="line">     * @var string</span><br><span class="line">     */</span><br><span class="line">    protected <span class="variable">$MIMEBody</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * The complete compiled MIME message headers.</span><br><span class="line">     *</span><br><span class="line">     * @var string</span><br><span class="line">     */</span><br><span class="line">    protected <span class="variable">$MIMEHeader</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Extra headers that createHeader() doesn<span class="string">&#x27;t fold in.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var string</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    protected $mailHeader = &#x27;</span><span class="string">&#x27;;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Word-wrap the message body to this number of chars.</span></span><br><span class="line"><span class="string">     * Set to 0 to not wrap. A useful value here is 78, for RFC2822 section 2.1.1 compliance.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @see static::STD_LINE_LENGTH</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var int</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public $WordWrap = 0;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Which method to use to send mail.</span></span><br><span class="line"><span class="string">     * Options: &quot;mail&quot;, &quot;sendmail&quot;, or &quot;smtp&quot;.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var string</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public $Mailer = &#x27;</span>mail<span class="string">&#x27;;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * The path to the sendmail program.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var string</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public $Sendmail = &#x27;</span>/usr/sbin/sendmail<span class="string">&#x27;;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Whether mail() uses a fully sendmail-compatible MTA.</span></span><br><span class="line"><span class="string">     * One which supports sendmail&#x27;</span>s <span class="string">&quot;-oi -f&quot;</span> options.</span><br><span class="line">     *</span><br><span class="line">     * @var bool</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$UseSendmailOptions</span> = <span class="literal">true</span>;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * The email address that a reading confirmation should be sent to, also known as <span class="built_in">read</span> receipt.</span><br><span class="line">     *</span><br><span class="line">     * @var string</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$ConfirmReadingTo</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * The hostname to use <span class="keyword">in</span> the Message-ID header and as default HELO string.</span><br><span class="line">     * If empty, PHPMailer attempts to find one with, <span class="keyword">in</span> order,</span><br><span class="line">     * <span class="variable">$_SERVER</span>[<span class="string">&#x27;SERVER_NAME&#x27;</span>], gethostname(), php_uname(<span class="string">&#x27;n&#x27;</span>), or the value</span><br><span class="line">     * <span class="string">&#x27;localhost.localdomain&#x27;</span>.</span><br><span class="line">     *</span><br><span class="line">     * @see PHPMailer::<span class="variable">$Helo</span></span><br><span class="line">     *</span><br><span class="line">     * @var string</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$Hostname</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * An ID to be used <span class="keyword">in</span> the Message-ID header.</span><br><span class="line">     * If empty, a unique <span class="built_in">id</span> will be generated.</span><br><span class="line">     * You can <span class="built_in">set</span> your own, but it must be <span class="keyword">in</span> the format <span class="string">&quot;&lt;id@domain&gt;&quot;</span>,</span><br><span class="line">     * as defined <span class="keyword">in</span> RFC5322 section 3.6.4 or it will be ignored.</span><br><span class="line">     *</span><br><span class="line">     * @see https://tools.ietf.org/html/rfc5322<span class="comment">#section-3.6.4</span></span><br><span class="line">     *</span><br><span class="line">     * @var string</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$MessageID</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * The message Date to be used <span class="keyword">in</span> the Date header.</span><br><span class="line">     * If empty, the current <span class="built_in">date</span> will be added.</span><br><span class="line">     *</span><br><span class="line">     * @var string</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$MessageDate</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * SMTP hosts.</span><br><span class="line">     * Either a single hostname or multiple semicolon-delimited hostnames.</span><br><span class="line">     * You can also specify a different port</span><br><span class="line">     * <span class="keyword">for</span> each host by using this format: [hostname:port]</span><br><span class="line">     * (e.g. <span class="string">&quot;smtp1.example.com:25;smtp2.example.com&quot;</span>).</span><br><span class="line">     * You can also specify encryption <span class="built_in">type</span>, <span class="keyword">for</span> example:</span><br><span class="line">     * (e.g. <span class="string">&quot;tls://smtp1.example.com:587;ssl://smtp2.example.com:465&quot;</span>).</span><br><span class="line">     * Hosts will be tried <span class="keyword">in</span> order.</span><br><span class="line">     *</span><br><span class="line">     * @var string</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$Host</span> = <span class="string">&#x27;localhost&#x27;</span>;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * The default SMTP server port.</span><br><span class="line">     *</span><br><span class="line">     * @var int</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$Port</span> = 25;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * The SMTP HELO/EHLO name used <span class="keyword">for</span> the SMTP connection.</span><br><span class="line">     * Default is <span class="variable">$Hostname</span>. If <span class="variable">$Hostname</span> is empty, PHPMailer attempts to find</span><br><span class="line">     * one with the same method described above <span class="keyword">for</span> <span class="variable">$Hostname</span>.</span><br><span class="line">     *</span><br><span class="line">     * @see PHPMailer::<span class="variable">$Hostname</span></span><br><span class="line">     *</span><br><span class="line">     * @var string</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$Helo</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * What kind of encryption to use on the SMTP connection.</span><br><span class="line">     * Options: <span class="string">&#x27;&#x27;</span>, static::ENCRYPTION_STARTTLS, or static::ENCRYPTION_SMTPS.</span><br><span class="line">     *</span><br><span class="line">     * @var string</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$SMTPSecure</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Whether to <span class="built_in">enable</span> TLS encryption automatically <span class="keyword">if</span> a server supports it,</span><br><span class="line">     * even <span class="keyword">if</span> `SMTPSecure` is not <span class="built_in">set</span> to <span class="string">&#x27;tls&#x27;</span>.</span><br><span class="line">     * Be aware that <span class="keyword">in</span> PHP &gt;= 5.6 this requires that the server<span class="string">&#x27;s certificates are valid.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var bool</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public $SMTPAutoTLS = true;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Whether to use SMTP authentication.</span></span><br><span class="line"><span class="string">     * Uses the Username and Password properties.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @see PHPMailer::$Username</span></span><br><span class="line"><span class="string">     * @see PHPMailer::$Password</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var bool</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public $SMTPAuth = false;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Options array passed to stream_context_create when connecting via SMTP.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var array</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public $SMTPOptions = [];</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * SMTP username.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var string</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public $Username = &#x27;</span><span class="string">&#x27;;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * SMTP password.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var string</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public $Password = &#x27;</span><span class="string">&#x27;;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * SMTP auth type.</span></span><br><span class="line"><span class="string">     * Options are CRAM-MD5, LOGIN, PLAIN, XOAUTH2, attempted in that order if not specified.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var string</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public $AuthType = &#x27;</span><span class="string">&#x27;;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * An instance of the PHPMailer OAuth class.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var OAuth</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    protected $oauth;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * The SMTP server timeout in seconds.</span></span><br><span class="line"><span class="string">     * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var int</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public $Timeout = 300;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Comma separated list of DSN notifications</span></span><br><span class="line"><span class="string">     * &#x27;</span>NEVER<span class="string">&#x27; under no circumstances a DSN must be returned to the sender.</span></span><br><span class="line"><span class="string">     *         If you use NEVER all other notifications will be ignored.</span></span><br><span class="line"><span class="string">     * &#x27;</span>SUCCESS<span class="string">&#x27; will notify you when your mail has arrived at its destination.</span></span><br><span class="line"><span class="string">     * &#x27;</span>FAILURE<span class="string">&#x27; will arrive if an error occurred during delivery.</span></span><br><span class="line"><span class="string">     * &#x27;</span>DELAY<span class="string">&#x27;   will notify you if there is an unusual delay in delivery, but the actual</span></span><br><span class="line"><span class="string">     *           delivery&#x27;</span>s outcome (success or failure) is not yet decided.</span><br><span class="line">     *</span><br><span class="line">     * @see https://tools.ietf.org/html/rfc3461 See section 4.1 <span class="keyword">for</span> more information about NOTIFY</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$dsn</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * SMTP class debug output mode.</span><br><span class="line">     * Debug output level.</span><br><span class="line">     * Options:</span><br><span class="line">     * * SMTP::DEBUG_OFF: No output</span><br><span class="line">     * * SMTP::DEBUG_CLIENT: Client messages</span><br><span class="line">     * * SMTP::DEBUG_SERVER: Client and server messages</span><br><span class="line">     * * SMTP::DEBUG_CONNECTION: As SERVER plus connection status</span><br><span class="line">     * * SMTP::DEBUG_LOWLEVEL: Noisy, low-level data output, rarely needed</span><br><span class="line">     *</span><br><span class="line">     * @see SMTP::<span class="variable">$do_debug</span></span><br><span class="line">     *</span><br><span class="line">     * @var int</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$SMTPDebug</span> = 0;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * How to handle debug output.</span><br><span class="line">     * Options:</span><br><span class="line">     * * `<span class="built_in">echo</span>` Output plain-text as-is, appropriate <span class="keyword">for</span> CLI</span><br><span class="line">     * * `html` Output escaped, line breaks converted to `&lt;br&gt;`, appropriate <span class="keyword">for</span> browser output</span><br><span class="line">     * * `error_log` Output to error <span class="built_in">log</span> as configured <span class="keyword">in</span> php.ini</span><br><span class="line">     * By default PHPMailer will use `<span class="built_in">echo</span>` <span class="keyword">if</span> run from a `cli` or `cli-server` SAPI, `html` otherwise.</span><br><span class="line">     * Alternatively, you can provide a callable expecting two params: a message string and the debug level:</span><br><span class="line">     *</span><br><span class="line">     * ```php</span><br><span class="line">     * <span class="variable">$mail</span>-&gt;Debugoutput = <span class="keyword">function</span>(<span class="variable">$str</span>, <span class="variable">$level</span>) &#123;<span class="built_in">echo</span> <span class="string">&quot;debug level <span class="variable">$level</span>; message: <span class="variable">$str</span>&quot;</span>;&#125;;</span><br><span class="line">     * ```</span><br><span class="line">     *</span><br><span class="line">     * Alternatively, you can pass <span class="keyword">in</span> an instance of a PSR-3 compatible logger, though only `debug`</span><br><span class="line">     * level output is used:</span><br><span class="line">     *</span><br><span class="line">     * ```php</span><br><span class="line">     * <span class="variable">$mail</span>-&gt;Debugoutput = new myPsr3Logger;</span><br><span class="line">     * ```</span><br><span class="line">     *</span><br><span class="line">     * @see SMTP::<span class="variable">$Debugoutput</span></span><br><span class="line">     *</span><br><span class="line">     * @var string|callable|\Psr\Log\LoggerInterface</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$Debugoutput</span> = <span class="string">&#x27;echo&#x27;</span>;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Whether to keep SMTP connection open after each message.</span><br><span class="line">     * If this is <span class="built_in">set</span> to <span class="literal">true</span> <span class="keyword">then</span> to close the connection</span><br><span class="line">     * requires an explicit call to smtpClose().</span><br><span class="line">     *</span><br><span class="line">     * @var bool</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$SMTPKeepAlive</span> = <span class="literal">false</span>;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Whether to <span class="built_in">split</span> multiple to addresses into multiple messages</span><br><span class="line">     * or send them all <span class="keyword">in</span> one message.</span><br><span class="line">     * Only supported <span class="keyword">in</span> `mail` and `sendmail` transports, not <span class="keyword">in</span> SMTP.</span><br><span class="line">     *</span><br><span class="line">     * @var bool</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$SingleTo</span> = <span class="literal">false</span>;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Storage <span class="keyword">for</span> addresses when SingleTo is enabled.</span><br><span class="line">     *</span><br><span class="line">     * @var array</span><br><span class="line">     */</span><br><span class="line">    protected <span class="variable">$SingleToArray</span> = [];</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Whether to generate VERP addresses on send.</span><br><span class="line">     * Only applicable when sending via SMTP.</span><br><span class="line">     *</span><br><span class="line">     * @see https://en.wikipedia.org/wiki/Variable_envelope_return_path</span><br><span class="line">     * @see http://www.postfix.org/VERP_README.html Postfix VERP info</span><br><span class="line">     *</span><br><span class="line">     * @var bool</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$do_verp</span> = <span class="literal">false</span>;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Whether to allow sending messages with an empty body.</span><br><span class="line">     *</span><br><span class="line">     * @var bool</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$AllowEmpty</span> = <span class="literal">false</span>;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * DKIM selector.</span><br><span class="line">     *</span><br><span class="line">     * @var string</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$DKIM_selector</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * DKIM Identity.</span><br><span class="line">     * Usually the email address used as the <span class="built_in">source</span> of the email.</span><br><span class="line">     *</span><br><span class="line">     * @var string</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$DKIM_identity</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * DKIM passphrase.</span><br><span class="line">     * Used <span class="keyword">if</span> your key is encrypted.</span><br><span class="line">     *</span><br><span class="line">     * @var string</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$DKIM_passphrase</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * DKIM signing domain name.</span><br><span class="line">     *</span><br><span class="line">     * @example <span class="string">&#x27;example.com&#x27;</span></span><br><span class="line">     *</span><br><span class="line">     * @var string</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$DKIM_domain</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * DKIM Copy header field values <span class="keyword">for</span> diagnostic use.</span><br><span class="line">     *</span><br><span class="line">     * @var bool</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$DKIM_copyHeaderFields</span> = <span class="literal">true</span>;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * DKIM Extra signing headers.</span><br><span class="line">     *</span><br><span class="line">     * @example [<span class="string">&#x27;List-Unsubscribe&#x27;</span>, <span class="string">&#x27;List-Help&#x27;</span>]</span><br><span class="line">     *</span><br><span class="line">     * @var array</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$DKIM_extraHeaders</span> = [];</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * DKIM private key file path.</span><br><span class="line">     *</span><br><span class="line">     * @var string</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$DKIM_private</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * DKIM private key string.</span><br><span class="line">     *</span><br><span class="line">     * If <span class="built_in">set</span>, takes precedence over `<span class="variable">$DKIM_private</span>`.</span><br><span class="line">     *</span><br><span class="line">     * @var string</span><br><span class="line">     */</span><br><span class="line">    public <span class="variable">$DKIM_private_string</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Callback Action <span class="keyword">function</span> name.</span><br><span class="line">     *</span><br><span class="line">     * The <span class="keyword">function</span> that handles the result of the send email action.</span><br><span class="line">     * It is called out by send() <span class="keyword">for</span> each email sent.</span><br><span class="line">     *</span><br><span class="line">     * Value can be any php callable: http://www.php.net/is_callable</span><br><span class="line">     *</span><br><span class="line">     * Parameters:</span><br><span class="line">     *   bool <span class="variable">$result</span>        result of the send action</span><br><span class="line">     *   array   <span class="variable">$to</span>            email addresses of the recipients</span><br><span class="line">     *   array   <span class="variable">$cc</span>            cc email addresses</span><br><span class="line">     *   array   <span class="variable">$bcc</span>           bcc email addresses</span><br><span class="line">     *   string  <span class="variable">$subject</span>       the subject</span><br><span class="line">     *   string  <span class="variable">$body</span>          the email body</span><br><span class="line">     *   string  <span class="variable">$from</span>          email address of sender</span><br><span class="line">     *   string  <span class="variable">$extra</span>         extra information of possible use</span><br><span class="line">     *                          <span class="string">&quot;smtp_transaction_id&#x27; =&gt; last smtp transaction id</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var string</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public <span class="variable">$action_function</span> = &#x27;&#x27;;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * What to put in the X-Mailer header.</span></span><br><span class="line"><span class="string">     * Options: An empty string for PHPMailer default, whitespace/null for none, or a string to use.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var string|null</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public <span class="variable">$XMailer</span> = &#x27;&#x27;;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Which validator to use by default when validating email addresses.</span></span><br><span class="line"><span class="string">     * May be a callable to inject your own validator, but there are several built-in validators.</span></span><br><span class="line"><span class="string">     * The default validator uses PHP&#x27;s FILTER_VALIDATE_EMAIL filter_var option.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @see PHPMailer::validateAddress()</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var string|callable</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public static <span class="variable">$validator</span> = &#x27;php&#x27;;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * An instance of the SMTP sender class.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var SMTP</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    protected <span class="variable">$smtp</span>;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * The array of &#x27;to&#x27; names and addresses.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var array</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    protected <span class="variable">$to</span> = [];</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * The array of &#x27;cc&#x27; names and addresses.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var array</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    protected <span class="variable">$cc</span> = [];</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * The array of &#x27;bcc&#x27; names and addresses.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var array</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    protected <span class="variable">$bcc</span> = [];</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * The array of reply-to names and addresses.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var array</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    protected <span class="variable">$ReplyTo</span> = [];</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * An array of all kinds of addresses.</span></span><br><span class="line"><span class="string">     * Includes all of <span class="variable">$to</span>, <span class="variable">$cc</span>, <span class="variable">$bcc</span>.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @see PHPMailer::<span class="variable">$to</span></span></span><br><span class="line"><span class="string">     * @see PHPMailer::<span class="variable">$cc</span></span></span><br><span class="line"><span class="string">     * @see PHPMailer::<span class="variable">$bcc</span></span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var array</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    protected <span class="variable">$all_recipients</span> = [];</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * An array of names and addresses queued for validation.</span></span><br><span class="line"><span class="string">     * In send(), valid and non duplicate entries are moved to <span class="variable">$all_recipients</span></span></span><br><span class="line"><span class="string">     * and one of <span class="variable">$to</span>, <span class="variable">$cc</span>, or <span class="variable">$bcc</span>.</span></span><br><span class="line"><span class="string">     * This array is used only for addresses with IDN.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @see PHPMailer::<span class="variable">$to</span></span></span><br><span class="line"><span class="string">     * @see PHPMailer::<span class="variable">$cc</span></span></span><br><span class="line"><span class="string">     * @see PHPMailer::<span class="variable">$bcc</span></span></span><br><span class="line"><span class="string">     * @see PHPMailer::<span class="variable">$all_recipients</span></span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var array</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    protected <span class="variable">$RecipientsQueue</span> = [];</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * An array of reply-to names and addresses queued for validation.</span></span><br><span class="line"><span class="string">     * In send(), valid and non duplicate entries are moved to <span class="variable">$ReplyTo</span>.</span></span><br><span class="line"><span class="string">     * This array is used only for addresses with IDN.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @see PHPMailer::<span class="variable">$ReplyTo</span></span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var array</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    protected <span class="variable">$ReplyToQueue</span> = [];</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * The array of attachments.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var array</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    protected <span class="variable">$attachment</span> = [];</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * The array of custom headers.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var array</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    protected <span class="variable">$CustomHeader</span> = [];</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * The most recent Message-ID (including angular brackets).</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var string</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    protected <span class="variable">$lastMessageID</span> = &#x27;&#x27;;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * The message&#x27;s MIME type.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var string</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    protected <span class="variable">$message_type</span> = &#x27;&#x27;;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * The array of MIME boundary strings.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var array</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    protected <span class="variable">$boundary</span> = [];</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * The array of available languages.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var array</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    protected <span class="variable">$language</span> = [];</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * The number of errors encountered.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var int</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    protected <span class="variable">$error_count</span> = 0;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * The S/MIME certificate file path.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var string</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    protected <span class="variable">$sign_cert_file</span> = &#x27;&#x27;;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * The S/MIME key file path.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var string</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    protected <span class="variable">$sign_key_file</span> = &#x27;&#x27;;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * The optional S/MIME extra certificates (&quot;</span>CA Chain<span class="string">&quot;) file path.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var string</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    protected <span class="variable">$sign_extracerts_file</span> = &#x27;&#x27;;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * The S/MIME password for the key.</span></span><br><span class="line"><span class="string">     * Used only if the key is encrypted.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var string</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    protected <span class="variable">$sign_key_pass</span> = &#x27;&#x27;;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Whether to throw exceptions for errors.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var bool</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    protected <span class="variable">$exceptions</span> = false;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Unique ID used for message ID and boundaries.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var string</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    protected <span class="variable">$uniqueid</span> = &#x27;&#x27;;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * The PHPMailer SystemVersion number.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var string</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    const VERSION = &#x27;6.1.5&#x27;;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Error severity: message only, continue processing.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var int</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    const STOP_MESSAGE = 0;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Error severity: message, likely ok to continue processing.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var int</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    const STOP_CONTINUE = 1;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Error severity: message, plus full stop, critical error reached.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var int</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    const STOP_CRITICAL = 2;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * The SMTP standard CRLF line break.</span></span><br><span class="line"><span class="string">     * If you want to change line break format, change static::<span class="variable">$LE</span>, not this.</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    const CRLF = &quot;</span>\r\n<span class="string">&quot;;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * &quot;</span>Folding White Space<span class="string">&quot; a white space string used for line folding.</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    const FWS = &#x27; &#x27;;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * SMTP RFC standard line ending; Carriage Return, Line Feed.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var string</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    protected static <span class="variable">$LE</span> = self::CRLF;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * The maximum line length supported by mail().</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * Background: mail() will sometimes corrupt messages</span></span><br><span class="line"><span class="string">     * with headers headers longer than 65 chars, see #818.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var int</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    const MAIL_MAX_LINE_LENGTH = 63;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * The maximum line length allowed by RFC 2822 section 2.1.1.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var int</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    const MAX_LINE_LENGTH = 998;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * The lower maximum line length allowed by RFC 2822 section 2.1.1.</span></span><br><span class="line"><span class="string">     * This length does NOT include the line break</span></span><br><span class="line"><span class="string">     * 76 means that lines will be 77 or 78 chars depending on whether</span></span><br><span class="line"><span class="string">     * the line break format is LF or CRLF; both are valid.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @var int</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    const STD_LINE_LENGTH = 76;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Constructor.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param bool <span class="variable">$exceptions</span> Should we throw external exceptions?</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function __construct(<span class="variable">$exceptions</span> = null)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        if (null !== <span class="variable">$exceptions</span>) &#123;</span></span><br><span class="line"><span class="string">            <span class="variable">$this</span>-&gt;exceptions = (bool) <span class="variable">$exceptions</span>;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        //Pick an appropriate debug output format automatically</span></span><br><span class="line"><span class="string">        <span class="variable">$this</span>-&gt;Debugoutput = (strpos(PHP_SAPI, &#x27;cli&#x27;) !== false ? &#x27;echo&#x27; : &#x27;html&#x27;);</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Destructor.</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function __destruct()</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        //Close any open SMTP connection nicely</span></span><br><span class="line"><span class="string">        <span class="variable">$this</span>-&gt;smtpClose();</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Call mail() in a safe_mode-aware fashion.</span></span><br><span class="line"><span class="string">     * Also, unless sendmail_path points to sendmail (or something that</span></span><br><span class="line"><span class="string">     * claims to be sendmail), don&#x27;t pass params (not a perfect fix,</span></span><br><span class="line"><span class="string">     * but it will do).</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string      <span class="variable">$to</span>      To</span></span><br><span class="line"><span class="string">     * @param string      <span class="variable">$subject</span> Subject</span></span><br><span class="line"><span class="string">     * @param string      <span class="variable">$body</span>    Message Body</span></span><br><span class="line"><span class="string">     * @param string      <span class="variable">$header</span>  Additional Header(s)</span></span><br><span class="line"><span class="string">     * @param string|null <span class="variable">$params</span>  Params</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return bool</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    private function mailPassthru(<span class="variable">$to</span>, <span class="variable">$subject</span>, <span class="variable">$body</span>, <span class="variable">$header</span>, <span class="variable">$params</span>)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        //Check overloading of mail function to avoid double-encoding</span></span><br><span class="line"><span class="string">        if (ini_get(&#x27;mbstring.func_overload&#x27;) &amp; 1) &#123;</span></span><br><span class="line"><span class="string">            <span class="variable">$subject</span> = <span class="variable">$this</span>-&gt;secureHeader(<span class="variable">$subject</span>);</span></span><br><span class="line"><span class="string">        &#125; else &#123;</span></span><br><span class="line"><span class="string">            <span class="variable">$subject</span> = <span class="variable">$this</span>-&gt;encodeHeader(<span class="variable">$this</span>-&gt;secureHeader(<span class="variable">$subject</span>));</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        //Calling mail() with null params breaks</span></span><br><span class="line"><span class="string">        if (!<span class="variable">$this</span>-&gt;UseSendmailOptions || null === <span class="variable">$params</span>) &#123;</span></span><br><span class="line"><span class="string">            <span class="variable">$result</span> = @mail(<span class="variable">$to</span>, <span class="variable">$subject</span>, <span class="variable">$body</span>, <span class="variable">$header</span>);</span></span><br><span class="line"><span class="string">        &#125; else &#123;</span></span><br><span class="line"><span class="string">            <span class="variable">$result</span> = @mail(<span class="variable">$to</span>, <span class="variable">$subject</span>, <span class="variable">$body</span>, <span class="variable">$header</span>, <span class="variable">$params</span>);</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        return <span class="variable">$result</span>;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Output debugging info via user-defined method.</span></span><br><span class="line"><span class="string">     * Only generates output if SMTP debug output is enabled (@see SMTP::<span class="variable">$do_debug</span>).</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @see PHPMailer::<span class="variable">$Debugoutput</span></span></span><br><span class="line"><span class="string">     * @see PHPMailer::<span class="variable">$SMTPDebug</span></span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$str</span></span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    protected function edebug(<span class="variable">$str</span>)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        if (<span class="variable">$this</span>-&gt;SMTPDebug &lt;= 0) &#123;</span></span><br><span class="line"><span class="string">            return;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        //Is this a PSR-3 logger?</span></span><br><span class="line"><span class="string">        if (<span class="variable">$this</span>-&gt;Debugoutput instanceof \Psr\Log\LoggerInterface) &#123;</span></span><br><span class="line"><span class="string">            <span class="variable">$this</span>-&gt;Debugoutput-&gt;debug(<span class="variable">$str</span>);</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">            return;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        //Avoid clash with built-in function names</span></span><br><span class="line"><span class="string">        if (is_callable(<span class="variable">$this</span>-&gt;Debugoutput) &amp;&amp; !in_array(<span class="variable">$this</span>-&gt;Debugoutput, [&#x27;error_log&#x27;, &#x27;html&#x27;, &#x27;echo&#x27;])) &#123;</span></span><br><span class="line"><span class="string">            call_user_func(<span class="variable">$this</span>-&gt;Debugoutput, <span class="variable">$str</span>, <span class="variable">$this</span>-&gt;SMTPDebug);</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">            return;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        switch (<span class="variable">$this</span>-&gt;Debugoutput) &#123;</span></span><br><span class="line"><span class="string">            case &#x27;error_log&#x27;:</span></span><br><span class="line"><span class="string">                //Don&#x27;t output, just log</span></span><br><span class="line"><span class="string">                error_log(<span class="variable">$str</span>);</span></span><br><span class="line"><span class="string">                break;</span></span><br><span class="line"><span class="string">            case &#x27;html&#x27;:</span></span><br><span class="line"><span class="string">                //Cleans up output a bit for a better looking, HTML-safe output</span></span><br><span class="line"><span class="string">                echo htmlentities(</span></span><br><span class="line"><span class="string">                    preg_replace(&#x27;/[\r\n]+/&#x27;, &#x27;&#x27;, <span class="variable">$str</span>),</span></span><br><span class="line"><span class="string">                    ENT_QUOTES,</span></span><br><span class="line"><span class="string">                    &#x27;UTF-8&#x27;</span></span><br><span class="line"><span class="string">                ), &quot;</span>&lt;br&gt;\n<span class="string">&quot;;</span></span><br><span class="line"><span class="string">                break;</span></span><br><span class="line"><span class="string">            case &#x27;echo&#x27;:</span></span><br><span class="line"><span class="string">            default:</span></span><br><span class="line"><span class="string">                //Normalize line breaks</span></span><br><span class="line"><span class="string">                <span class="variable">$str</span> = preg_replace(&#x27;/\r\n|\r/m&#x27;, &quot;</span>\n<span class="string">&quot;, <span class="variable">$str</span>);</span></span><br><span class="line"><span class="string">                echo gmdate(&#x27;Y-m-d H:i:s&#x27;),</span></span><br><span class="line"><span class="string">                &quot;</span>\t<span class="string">&quot;,</span></span><br><span class="line"><span class="string">                    //Trim trailing space</span></span><br><span class="line"><span class="string">                trim(</span></span><br><span class="line"><span class="string">                    //Indent for readability, except for trailing break</span></span><br><span class="line"><span class="string">                    str_replace(</span></span><br><span class="line"><span class="string">                        &quot;</span>\n<span class="string">&quot;,</span></span><br><span class="line"><span class="string">                        &quot;</span>\n                   \t                  <span class="string">&quot;,</span></span><br><span class="line"><span class="string">                        trim(<span class="variable">$str</span>)</span></span><br><span class="line"><span class="string">                    )</span></span><br><span class="line"><span class="string">                ),</span></span><br><span class="line"><span class="string">                &quot;</span>\n<span class="string">&quot;;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Sets message type to HTML or plain.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param bool <span class="variable">$isHtml</span> True for HTML mode</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function isHTML(<span class="variable">$isHtml</span> = true)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        if (<span class="variable">$isHtml</span>) &#123;</span></span><br><span class="line"><span class="string">            <span class="variable">$this</span>-&gt;ContentType = static::CONTENT_TYPE_TEXT_HTML;</span></span><br><span class="line"><span class="string">        &#125; else &#123;</span></span><br><span class="line"><span class="string">            <span class="variable">$this</span>-&gt;ContentType = static::CONTENT_TYPE_PLAINTEXT;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Send messages using SMTP.</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function isSMTP()</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        <span class="variable">$this</span>-&gt;Mailer = &#x27;smtp&#x27;;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Send messages using PHP&#x27;s mail() function.</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function isMail()</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        <span class="variable">$this</span>-&gt;Mailer = &#x27;mail&#x27;;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Send messages using <span class="variable">$Sendmail</span>.</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function isSendmail()</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        <span class="variable">$ini_sendmail_path</span> = ini_get(&#x27;sendmail_path&#x27;);</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        if (false === stripos(<span class="variable">$ini_sendmail_path</span>, &#x27;sendmail&#x27;)) &#123;</span></span><br><span class="line"><span class="string">            <span class="variable">$this</span>-&gt;Sendmail = &#x27;/usr/sbin/sendmail&#x27;;</span></span><br><span class="line"><span class="string">        &#125; else &#123;</span></span><br><span class="line"><span class="string">            <span class="variable">$this</span>-&gt;Sendmail = <span class="variable">$ini_sendmail_path</span>;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        <span class="variable">$this</span>-&gt;Mailer = &#x27;sendmail&#x27;;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Send messages using qmail.</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function isQmail()</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        <span class="variable">$ini_sendmail_path</span> = ini_get(&#x27;sendmail_path&#x27;);</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        if (false === stripos(<span class="variable">$ini_sendmail_path</span>, &#x27;qmail&#x27;)) &#123;</span></span><br><span class="line"><span class="string">            <span class="variable">$this</span>-&gt;Sendmail = &#x27;/var/qmail/bin/qmail-inject&#x27;;</span></span><br><span class="line"><span class="string">        &#125; else &#123;</span></span><br><span class="line"><span class="string">            <span class="variable">$this</span>-&gt;Sendmail = <span class="variable">$ini_sendmail_path</span>;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        <span class="variable">$this</span>-&gt;Mailer = &#x27;qmail&#x27;;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Add a &quot;</span>To<span class="string">&quot; address.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$address</span> The email address to send to</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$name</span></span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @throws Exception</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return bool true on success, false if address already used or invalid in some way</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function addAddress(<span class="variable">$address</span>, <span class="variable">$name</span> = &#x27;&#x27;)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        return <span class="variable">$this</span>-&gt;addOrEnqueueAnAddress(&#x27;to&#x27;, <span class="variable">$address</span>, <span class="variable">$name</span>);</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Add a &quot;</span>CC<span class="string">&quot; address.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$address</span> The email address to send to</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$name</span></span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @throws Exception</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return bool true on success, false if address already used or invalid in some way</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function addCC(<span class="variable">$address</span>, <span class="variable">$name</span> = &#x27;&#x27;)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        return <span class="variable">$this</span>-&gt;addOrEnqueueAnAddress(&#x27;cc&#x27;, <span class="variable">$address</span>, <span class="variable">$name</span>);</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Add a &quot;</span>BCC<span class="string">&quot; address.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$address</span> The email address to send to</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$name</span></span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @throws Exception</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return bool true on success, false if address already used or invalid in some way</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function addBCC(<span class="variable">$address</span>, <span class="variable">$name</span> = &#x27;&#x27;)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        return <span class="variable">$this</span>-&gt;addOrEnqueueAnAddress(&#x27;bcc&#x27;, <span class="variable">$address</span>, <span class="variable">$name</span>);</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Add a &quot;</span>Reply-To<span class="string">&quot; address.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$address</span> The email address to reply to</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$name</span></span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @throws Exception</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return bool true on success, false if address already used or invalid in some way</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function addReplyTo(<span class="variable">$address</span>, <span class="variable">$name</span> = &#x27;&#x27;)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        return <span class="variable">$this</span>-&gt;addOrEnqueueAnAddress(&#x27;Reply-To&#x27;, <span class="variable">$address</span>, <span class="variable">$name</span>);</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Add an address to one of the recipient arrays or to the ReplyTo array. Because PHPMailer</span></span><br><span class="line"><span class="string">     * can&#x27;t validate addresses with an IDN without knowing the PHPMailer::<span class="variable">$CharSet</span> (that can still</span></span><br><span class="line"><span class="string">     * be modified after calling this function), addition of such addresses is delayed until send().</span></span><br><span class="line"><span class="string">     * Addresses that have been added already return false, but do not throw exceptions.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$kind</span>    One of &#x27;to&#x27;, &#x27;cc&#x27;, &#x27;bcc&#x27;, or &#x27;ReplyTo&#x27;</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$address</span> The email address to send, resp. to reply to</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$name</span></span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @throws Exception</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return bool true on success, false if address already used or invalid in some way</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    protected function addOrEnqueueAnAddress(<span class="variable">$kind</span>, <span class="variable">$address</span>, <span class="variable">$name</span>)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        <span class="variable">$address</span> = trim(<span class="variable">$address</span>);</span></span><br><span class="line"><span class="string">        <span class="variable">$name</span> = trim(preg_replace(&#x27;/[\r\n]+/&#x27;, &#x27;&#x27;, <span class="variable">$name</span>)); //Strip breaks and trim</span></span><br><span class="line"><span class="string">        <span class="variable">$pos</span> = strrpos(<span class="variable">$address</span>, &#x27;@&#x27;);</span></span><br><span class="line"><span class="string">        if (false === <span class="variable">$pos</span>) &#123;</span></span><br><span class="line"><span class="string">            // At-sign is missing.</span></span><br><span class="line"><span class="string">            <span class="variable">$error_message</span> = sprintf(</span></span><br><span class="line"><span class="string">                &#x27;%s (%s): %s&#x27;,</span></span><br><span class="line"><span class="string">                <span class="variable">$this</span>-&gt;lang(&#x27;invalid_address&#x27;),</span></span><br><span class="line"><span class="string">                <span class="variable">$kind</span>,</span></span><br><span class="line"><span class="string">                <span class="variable">$address</span></span></span><br><span class="line"><span class="string">            );</span></span><br><span class="line"><span class="string">            <span class="variable">$this</span>-&gt;setError(<span class="variable">$error_message</span>);</span></span><br><span class="line"><span class="string">            <span class="variable">$this</span>-&gt;edebug(<span class="variable">$error_message</span>);</span></span><br><span class="line"><span class="string">            if (<span class="variable">$this</span>-&gt;exceptions) &#123;</span></span><br><span class="line"><span class="string">                throw new Exception(<span class="variable">$error_message</span>);</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">            return false;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        <span class="variable">$params</span> = [<span class="variable">$kind</span>, <span class="variable">$address</span>, <span class="variable">$name</span>];</span></span><br><span class="line"><span class="string">        // Enqueue addresses with IDN until we know the PHPMailer::<span class="variable">$CharSet</span>.</span></span><br><span class="line"><span class="string">        if (static::idnSupported() &amp;&amp; <span class="variable">$this</span>-&gt;has8bitChars(substr(<span class="variable">$address</span>, ++<span class="variable">$pos</span>))) &#123;</span></span><br><span class="line"><span class="string">            if (&#x27;Reply-To&#x27; !== <span class="variable">$kind</span>) &#123;</span></span><br><span class="line"><span class="string">                if (!array_key_exists(<span class="variable">$address</span>, <span class="variable">$this</span>-&gt;RecipientsQueue)) &#123;</span></span><br><span class="line"><span class="string">                    <span class="variable">$this</span>-&gt;RecipientsQueue[<span class="variable">$address</span>] = <span class="variable">$params</span>;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">                    return true;</span></span><br><span class="line"><span class="string">                &#125;</span></span><br><span class="line"><span class="string">            &#125; elseif (!array_key_exists(<span class="variable">$address</span>, <span class="variable">$this</span>-&gt;ReplyToQueue)) &#123;</span></span><br><span class="line"><span class="string">                <span class="variable">$this</span>-&gt;ReplyToQueue[<span class="variable">$address</span>] = <span class="variable">$params</span>;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">                return true;</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">            return false;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        // Immediately add standard addresses without IDN.</span></span><br><span class="line"><span class="string">        return call_user_func_array([<span class="variable">$this</span>, &#x27;addAnAddress&#x27;], <span class="variable">$params</span>);</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Add an address to one of the recipient arrays or to the ReplyTo array.</span></span><br><span class="line"><span class="string">     * Addresses that have been added already return false, but do not throw exceptions.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$kind</span>    One of &#x27;to&#x27;, &#x27;cc&#x27;, &#x27;bcc&#x27;, or &#x27;ReplyTo&#x27;</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$address</span> The email address to send, resp. to reply to</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$name</span></span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @throws Exception</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return bool true on success, false if address already used or invalid in some way</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    protected function addAnAddress(<span class="variable">$kind</span>, <span class="variable">$address</span>, <span class="variable">$name</span> = &#x27;&#x27;)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        if (!in_array(<span class="variable">$kind</span>, [&#x27;to&#x27;, &#x27;cc&#x27;, &#x27;bcc&#x27;, &#x27;Reply-To&#x27;])) &#123;</span></span><br><span class="line"><span class="string">            <span class="variable">$error_message</span> = sprintf(</span></span><br><span class="line"><span class="string">                &#x27;%s: %s&#x27;,</span></span><br><span class="line"><span class="string">                <span class="variable">$this</span>-&gt;lang(&#x27;Invalid recipient kind&#x27;),</span></span><br><span class="line"><span class="string">                <span class="variable">$kind</span></span></span><br><span class="line"><span class="string">            );</span></span><br><span class="line"><span class="string">            <span class="variable">$this</span>-&gt;setError(<span class="variable">$error_message</span>);</span></span><br><span class="line"><span class="string">            <span class="variable">$this</span>-&gt;edebug(<span class="variable">$error_message</span>);</span></span><br><span class="line"><span class="string">            if (<span class="variable">$this</span>-&gt;exceptions) &#123;</span></span><br><span class="line"><span class="string">                throw new Exception(<span class="variable">$error_message</span>);</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">            return false;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        if (!static::validateAddress(<span class="variable">$address</span>)) &#123;</span></span><br><span class="line"><span class="string">            <span class="variable">$error_message</span> = sprintf(</span></span><br><span class="line"><span class="string">                &#x27;%s (%s): %s&#x27;,</span></span><br><span class="line"><span class="string">                <span class="variable">$this</span>-&gt;lang(&#x27;invalid_address&#x27;),</span></span><br><span class="line"><span class="string">                <span class="variable">$kind</span>,</span></span><br><span class="line"><span class="string">                <span class="variable">$address</span></span></span><br><span class="line"><span class="string">            );</span></span><br><span class="line"><span class="string">            <span class="variable">$this</span>-&gt;setError(<span class="variable">$error_message</span>);</span></span><br><span class="line"><span class="string">            <span class="variable">$this</span>-&gt;edebug(<span class="variable">$error_message</span>);</span></span><br><span class="line"><span class="string">            if (<span class="variable">$this</span>-&gt;exceptions) &#123;</span></span><br><span class="line"><span class="string">                throw new Exception(<span class="variable">$error_message</span>);</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">            return false;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        if (&#x27;Reply-To&#x27; !== <span class="variable">$kind</span>) &#123;</span></span><br><span class="line"><span class="string">            if (!array_key_exists(strtolower(<span class="variable">$address</span>), <span class="variable">$this</span>-&gt;all_recipients)) &#123;</span></span><br><span class="line"><span class="string">                <span class="variable">$this</span>-&gt;&#123;<span class="variable">$kind</span>&#125;[] = [<span class="variable">$address</span>, <span class="variable">$name</span>];</span></span><br><span class="line"><span class="string">                <span class="variable">$this</span>-&gt;all_recipients[strtolower(<span class="variable">$address</span>)] = true;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">                return true;</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string">        &#125; elseif (!array_key_exists(strtolower(<span class="variable">$address</span>), <span class="variable">$this</span>-&gt;ReplyTo)) &#123;</span></span><br><span class="line"><span class="string">            <span class="variable">$this</span>-&gt;ReplyTo[strtolower(<span class="variable">$address</span>)] = [<span class="variable">$address</span>, <span class="variable">$name</span>];</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">            return true;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        return false;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Parse and validate a string containing one or more RFC822-style comma-separated email addresses</span></span><br><span class="line"><span class="string">     * of the form &quot;</span>display name &lt;address&gt;<span class="string">&quot; into an array of name/address pairs.</span></span><br><span class="line"><span class="string">     * Uses the imap_rfc822_parse_adrlist function if the IMAP extension is available.</span></span><br><span class="line"><span class="string">     * Note that quotes in the name part are removed.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @see http://www.andrew.cmu.edu/user/agreen1/testing/mrbs/web/Mail/RFC822.php A more careful implementation</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$addrstr</span> The address list string</span></span><br><span class="line"><span class="string">     * @param bool   <span class="variable">$useimap</span> Whether to use the IMAP extension to parse the list</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return array</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public static function parseAddresses(<span class="variable">$addrstr</span>, <span class="variable">$useimap</span> = true)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        <span class="variable">$addresses</span> = [];</span></span><br><span class="line"><span class="string">        if (<span class="variable">$useimap</span> &amp;&amp; function_exists(&#x27;imap_rfc822_parse_adrlist&#x27;)) &#123;</span></span><br><span class="line"><span class="string">            //Use this built-in parser if it&#x27;s available</span></span><br><span class="line"><span class="string">            <span class="variable">$list</span> = imap_rfc822_parse_adrlist(<span class="variable">$addrstr</span>, &#x27;&#x27;);</span></span><br><span class="line"><span class="string">            foreach (<span class="variable">$list</span> as <span class="variable">$address</span>) &#123;</span></span><br><span class="line"><span class="string">                if ((&#x27;.SYNTAX-ERROR.&#x27; !== <span class="variable">$address</span>-&gt;host) &amp;&amp; static::validateAddress(</span></span><br><span class="line"><span class="string">                    <span class="variable">$address</span>-&gt;mailbox . &#x27;@&#x27; . <span class="variable">$address</span>-&gt;host</span></span><br><span class="line"><span class="string">                )) &#123;</span></span><br><span class="line"><span class="string">                    <span class="variable">$addresses</span>[] = [</span></span><br><span class="line"><span class="string">                        &#x27;name&#x27; =&gt; (property_exists(<span class="variable">$address</span>, &#x27;personal&#x27;) ? <span class="variable">$address</span>-&gt;personal : &#x27;&#x27;),</span></span><br><span class="line"><span class="string">                        &#x27;address&#x27; =&gt; <span class="variable">$address</span>-&gt;mailbox . &#x27;@&#x27; . <span class="variable">$address</span>-&gt;host,</span></span><br><span class="line"><span class="string">                    ];</span></span><br><span class="line"><span class="string">                &#125;</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string">        &#125; else &#123;</span></span><br><span class="line"><span class="string">            //Use this simpler parser</span></span><br><span class="line"><span class="string">            <span class="variable">$list</span> = explode(&#x27;,&#x27;, <span class="variable">$addrstr</span>);</span></span><br><span class="line"><span class="string">            foreach (<span class="variable">$list</span> as <span class="variable">$address</span>) &#123;</span></span><br><span class="line"><span class="string">                <span class="variable">$address</span> = trim(<span class="variable">$address</span>);</span></span><br><span class="line"><span class="string">                //Is there a separate name part?</span></span><br><span class="line"><span class="string">                if (strpos(<span class="variable">$address</span>, &#x27;&lt;&#x27;) === false) &#123;</span></span><br><span class="line"><span class="string">                    //No separate name, just use the whole thing</span></span><br><span class="line"><span class="string">                    if (static::validateAddress(<span class="variable">$address</span>)) &#123;</span></span><br><span class="line"><span class="string">                        <span class="variable">$addresses</span>[] = [</span></span><br><span class="line"><span class="string">                            &#x27;name&#x27; =&gt; &#x27;&#x27;,</span></span><br><span class="line"><span class="string">                            &#x27;address&#x27; =&gt; <span class="variable">$address</span>,</span></span><br><span class="line"><span class="string">                        ];</span></span><br><span class="line"><span class="string">                    &#125;</span></span><br><span class="line"><span class="string">                &#125; else &#123;</span></span><br><span class="line"><span class="string">                    list(<span class="variable">$name</span>, <span class="variable">$email</span>) = explode(&#x27;&lt;&#x27;, <span class="variable">$address</span>);</span></span><br><span class="line"><span class="string">                    <span class="variable">$email</span> = trim(str_replace(&#x27;&gt;&#x27;, &#x27;&#x27;, <span class="variable">$email</span>));</span></span><br><span class="line"><span class="string">                    if (static::validateAddress(<span class="variable">$email</span>)) &#123;</span></span><br><span class="line"><span class="string">                        <span class="variable">$addresses</span>[] = [</span></span><br><span class="line"><span class="string">                            &#x27;name&#x27; =&gt; trim(str_replace([&#x27;&quot;</span><span class="string">&#x27;, &quot;&#x27;</span><span class="string">&quot;], &#x27;&#x27;, <span class="variable">$name</span>)),</span></span><br><span class="line"><span class="string">                            &#x27;address&#x27; =&gt; <span class="variable">$email</span>,</span></span><br><span class="line"><span class="string">                        ];</span></span><br><span class="line"><span class="string">                    &#125;</span></span><br><span class="line"><span class="string">                &#125;</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        return <span class="variable">$addresses</span>;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Set the From and FromName properties.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$address</span></span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$name</span></span></span><br><span class="line"><span class="string">     * @param bool   <span class="variable">$auto</span>    Whether to also set the Sender address, defaults to true</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @throws Exception</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return bool</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function setFrom(<span class="variable">$address</span>, <span class="variable">$name</span> = &#x27;&#x27;, <span class="variable">$auto</span> = true)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        <span class="variable">$address</span> = trim(<span class="variable">$address</span>);</span></span><br><span class="line"><span class="string">        <span class="variable">$name</span> = trim(preg_replace(&#x27;/[\r\n]+/&#x27;, &#x27;&#x27;, <span class="variable">$name</span>)); //Strip breaks and trim</span></span><br><span class="line"><span class="string">        // Don&#x27;t validate now addresses with IDN. Will be done in send().</span></span><br><span class="line"><span class="string">        <span class="variable">$pos</span> = strrpos(<span class="variable">$address</span>, &#x27;@&#x27;);</span></span><br><span class="line"><span class="string">        if ((false === <span class="variable">$pos</span>)</span></span><br><span class="line"><span class="string">            || ((!<span class="variable">$this</span>-&gt;has8bitChars(substr(<span class="variable">$address</span>, ++<span class="variable">$pos</span>)) || !static::idnSupported())</span></span><br><span class="line"><span class="string">            &amp;&amp; !static::validateAddress(<span class="variable">$address</span>))</span></span><br><span class="line"><span class="string">        ) &#123;</span></span><br><span class="line"><span class="string">            <span class="variable">$error_message</span> = sprintf(</span></span><br><span class="line"><span class="string">                &#x27;%s (From): %s&#x27;,</span></span><br><span class="line"><span class="string">                <span class="variable">$this</span>-&gt;lang(&#x27;invalid_address&#x27;),</span></span><br><span class="line"><span class="string">                <span class="variable">$address</span></span></span><br><span class="line"><span class="string">            );</span></span><br><span class="line"><span class="string">            <span class="variable">$this</span>-&gt;setError(<span class="variable">$error_message</span>);</span></span><br><span class="line"><span class="string">            <span class="variable">$this</span>-&gt;edebug(<span class="variable">$error_message</span>);</span></span><br><span class="line"><span class="string">            if (<span class="variable">$this</span>-&gt;exceptions) &#123;</span></span><br><span class="line"><span class="string">                throw new Exception(<span class="variable">$error_message</span>);</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">            return false;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        <span class="variable">$this</span>-&gt;From = <span class="variable">$address</span>;</span></span><br><span class="line"><span class="string">        <span class="variable">$this</span>-&gt;FromName = <span class="variable">$name</span>;</span></span><br><span class="line"><span class="string">        if (<span class="variable">$auto</span> &amp;&amp; empty(<span class="variable">$this</span>-&gt;Sender)) &#123;</span></span><br><span class="line"><span class="string">            <span class="variable">$this</span>-&gt;Sender = <span class="variable">$address</span>;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        return true;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Return the Message-ID header of the last email.</span></span><br><span class="line"><span class="string">     * Technically this is the value from the last time the headers were created,</span></span><br><span class="line"><span class="string">     * but it&#x27;s also the message ID of the last sent message except in</span></span><br><span class="line"><span class="string">     * pathological cases.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return string</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function getLastMessageID()</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        return <span class="variable">$this</span>-&gt;lastMessageID;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Check that a string looks like an email address.</span></span><br><span class="line"><span class="string">     * Validation patterns supported:</span></span><br><span class="line"><span class="string">     * * `auto` Pick best pattern automatically;</span></span><br><span class="line"><span class="string">     * * `pcre8` Use the squiloople.com pattern, requires PCRE &gt; 8.0;</span></span><br><span class="line"><span class="string">     * * `pcre` Use old PCRE implementation;</span></span><br><span class="line"><span class="string">     * * `php` Use PHP built-in FILTER_VALIDATE_EMAIL;</span></span><br><span class="line"><span class="string">     * * `html5` Use the pattern given by the HTML5 spec for &#x27;email&#x27; type form input elements.</span></span><br><span class="line"><span class="string">     * * `noregex` Don&#x27;t use a regex: super fast, really dumb.</span></span><br><span class="line"><span class="string">     * Alternatively you may pass in a callable to inject your own validator, for example:</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * ```php</span></span><br><span class="line"><span class="string">     * PHPMailer::validateAddress(&#x27;user@example.com&#x27;, function(<span class="variable">$address</span>) &#123;</span></span><br><span class="line"><span class="string">     *     return (strpos(<span class="variable">$address</span>, &#x27;@&#x27;) !== false);</span></span><br><span class="line"><span class="string">     * &#125;);</span></span><br><span class="line"><span class="string">     * ```</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * You can also set the PHPMailer::<span class="variable">$validator</span> static to a callable, allowing built-in methods to use your validator.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string          <span class="variable">$address</span>       The email address to check</span></span><br><span class="line"><span class="string">     * @param string|callable <span class="variable">$patternselect</span> Which pattern to use</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return bool</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public static function validateAddress(<span class="variable">$address</span>, <span class="variable">$patternselect</span> = null)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        if (null === <span class="variable">$patternselect</span>) &#123;</span></span><br><span class="line"><span class="string">            <span class="variable">$patternselect</span> = static::<span class="variable">$validator</span>;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        if (is_callable(<span class="variable">$patternselect</span>)) &#123;</span></span><br><span class="line"><span class="string">            return <span class="variable">$patternselect</span>(<span class="variable">$address</span>);</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        //Reject line breaks in addresses; it&#x27;s valid RFC5322, but not RFC5321</span></span><br><span class="line"><span class="string">        if (strpos(<span class="variable">$address</span>, &quot;</span>\n<span class="string">&quot;) !== false || strpos(<span class="variable">$address</span>, &quot;</span>\r<span class="string">&quot;) !== false) &#123;</span></span><br><span class="line"><span class="string">            return false;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        switch (<span class="variable">$patternselect</span>) &#123;</span></span><br><span class="line"><span class="string">            case &#x27;pcre&#x27;: //Kept for BC</span></span><br><span class="line"><span class="string">            case &#x27;pcre8&#x27;:</span></span><br><span class="line"><span class="string">                /*</span></span><br><span class="line"><span class="string">                 * A more complex and more permissive version of the RFC5322 regex on which FILTER_VALIDATE_EMAIL</span></span><br><span class="line"><span class="string">                 * is based.</span></span><br><span class="line"><span class="string">                 * In addition to the addresses allowed by filter_var, also permits:</span></span><br><span class="line"><span class="string">                 *  * dotless domains: `a@b`</span></span><br><span class="line"><span class="string">                 *  * comments: `1234 @ local(blah) .machine .example`</span></span><br><span class="line"><span class="string">                 *  * quoted elements: `&#x27;&quot;</span><span class="built_in">test</span> blah<span class="string">&quot;@example.org&#x27;`</span></span><br><span class="line"><span class="string">                 *  * numeric TLDs: `a@b.123`</span></span><br><span class="line"><span class="string">                 *  * unbracketed IPv4 literals: `a@192.168.0.1`</span></span><br><span class="line"><span class="string">                 *  * IPv6 literals: &#x27;first.last@[IPv6:a1::]&#x27;</span></span><br><span class="line"><span class="string">                 * Not all of these will necessarily work for sending!</span></span><br><span class="line"><span class="string">                 *</span></span><br><span class="line"><span class="string">                 * @see       http://squiloople.com/2009/12/20/email-address-validation/</span></span><br><span class="line"><span class="string">                 * @copyright 2009-2010 Michael Rushton</span></span><br><span class="line"><span class="string">                 * Feel free to use and redistribute this code. But please keep this copyright notice.</span></span><br><span class="line"><span class="string">                 */</span></span><br><span class="line"><span class="string">                return (bool) preg_match(</span></span><br><span class="line"><span class="string">                    &#x27;/^(?!(?&gt;(?1)&quot;</span>?(?&gt;\\\[ -~]|[^<span class="string">&quot;])&quot;</span>?(?1))&#123;255,&#125;)(?!(?&gt;(?1)<span class="string">&quot;?(?&gt;\\\[ -~]|[^&quot;</span>])<span class="string">&quot;?(?1))&#123;65,&#125;@)&#x27; .</span></span><br><span class="line"><span class="string">                    &#x27;((?&gt;(?&gt;(?&gt;((?&gt;(?&gt;(?&gt;\x0D\x0A)?[\t ])+|(?&gt;[\t ]*\x0D\x0A)?[\t ]+)?)(\((?&gt;(?2)&#x27; .</span></span><br><span class="line"><span class="string">                    &#x27;(?&gt;[\x01-\x08\x0B\x0C\x0E-\&#x27;*-\[\]-\x7F]|\\\[\x00-\x7F]|(?3)))*(?2)\)))+(?2))|(?2))?)&#x27; .</span></span><br><span class="line"><span class="string">                    &#x27;([!#-\&#x27;*+\/-9=?^-~-]+|&quot;</span>(?&gt;(?2)(?&gt;[\x01-\x08\x0B\x0C\x0E-!<span class="comment">#-\[\]-\x7F]|\\\[\x00-\x7F]))*&#x27; .</span></span><br><span class="line">                    <span class="string">&#x27;(?2)&quot;)(?&gt;(?1)\.(?1)(?4))*(?1)@(?!(?1)[a-z0-9-]&#123;64,&#125;)(?1)(?&gt;([a-z0-9](?&gt;[a-z0-9-]*[a-z0-9])?)&#x27;</span> .</span><br><span class="line">                    <span class="string">&#x27;(?&gt;(?1)\.(?!(?1)[a-z0-9-]&#123;64,&#125;)(?1)(?5))&#123;0,126&#125;|\[(?:(?&gt;IPv6:(?&gt;([a-f0-9]&#123;1,4&#125;)(?&gt;:(?6))&#123;7&#125;&#x27;</span> .</span><br><span class="line">                    <span class="string">&#x27;|(?!(?:.*[a-f0-9][:\]])&#123;8,&#125;)((?6)(?&gt;:(?6))&#123;0,6&#125;)?::(?7)?))|(?&gt;(?&gt;IPv6:(?&gt;(?6)(?&gt;:(?6))&#123;5&#125;:&#x27;</span> .</span><br><span class="line">                    <span class="string">&#x27;|(?!(?:.*[a-f0-9]:)&#123;6,&#125;)(?8)?::(?&gt;((?6)(?&gt;:(?6))&#123;0,4&#125;):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]&#123;2&#125;&#x27;</span> .</span><br><span class="line">                    <span class="string">&#x27;|[1-9]?[0-9])(?&gt;\.(?9))&#123;3&#125;))\])(?1)$/isD&#x27;</span>,</span><br><span class="line">                    <span class="variable">$address</span></span><br><span class="line">                );</span><br><span class="line">            <span class="keyword">case</span> <span class="string">&#x27;html5&#x27;</span>:</span><br><span class="line">                /*</span><br><span class="line">                 * This is the pattern used <span class="keyword">in</span> the HTML5 spec <span class="keyword">for</span> validation of <span class="string">&#x27;email&#x27;</span> <span class="built_in">type</span> form input elements.</span><br><span class="line">                 *</span><br><span class="line">                 * @see http://www.whatwg.org/specs/web-apps/current-work/<span class="comment">#e-mail-state-(type=email)</span></span><br><span class="line">                 */</span><br><span class="line">                <span class="built_in">return</span> (bool) preg_match(</span><br><span class="line">                    <span class="string">&#x27;/^[a-zA-Z0-9.!#$%&amp;\&#x27;</span>*+\/=?^_`&#123;|&#125;~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]&#123;0,61&#125;<span class="string">&#x27; .</span></span><br><span class="line"><span class="string">                    &#x27;</span>[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]&#123;0,61&#125;[a-zA-Z0-9])?)*$/sD<span class="string">&#x27;,</span></span><br><span class="line"><span class="string">                    $address</span></span><br><span class="line"><span class="string">                );</span></span><br><span class="line"><span class="string">            case &#x27;</span>php<span class="string">&#x27;:</span></span><br><span class="line"><span class="string">            default:</span></span><br><span class="line"><span class="string">                return filter_var($address, FILTER_VALIDATE_EMAIL) !== false;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Tells whether IDNs (Internationalized Domain Names) are supported or not. This requires the</span></span><br><span class="line"><span class="string">     * `intl` and `mbstring` PHP extensions.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return bool `true` if required functions for IDN support are present</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public static function idnSupported()</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        return function_exists(&#x27;</span>idn_to_ascii<span class="string">&#x27;) &amp;&amp; function_exists(&#x27;</span>mb_convert_encoding<span class="string">&#x27;);</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Converts IDN in given email address to its ASCII form, also known as punycode, if possible.</span></span><br><span class="line"><span class="string">     * Important: Address must be passed in same encoding as currently set in PHPMailer::$CharSet.</span></span><br><span class="line"><span class="string">     * This function silently returns unmodified address if:</span></span><br><span class="line"><span class="string">     * - No conversion is necessary (i.e. domain name is not an IDN, or is already in ASCII form)</span></span><br><span class="line"><span class="string">     * - Conversion to punycode is impossible (e.g. required PHP functions are not available)</span></span><br><span class="line"><span class="string">     *   or fails for any reason (e.g. domain contains characters not allowed in an IDN).</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @see PHPMailer::$CharSet</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string $address The email address to convert</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return string The encoded address in ASCII form</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function punyencodeAddress($address)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        // Verify we have required functions, CharSet, and at-sign.</span></span><br><span class="line"><span class="string">        $pos = strrpos($address, &#x27;</span>@<span class="string">&#x27;);</span></span><br><span class="line"><span class="string">        if (!empty($this-&gt;CharSet) &amp;&amp;</span></span><br><span class="line"><span class="string">            false !== $pos &amp;&amp;</span></span><br><span class="line"><span class="string">            static::idnSupported()</span></span><br><span class="line"><span class="string">        ) &#123;</span></span><br><span class="line"><span class="string">            $domain = substr($address, ++$pos);</span></span><br><span class="line"><span class="string">            // Verify CharSet string is a valid one, and domain properly encoded in this CharSet.</span></span><br><span class="line"><span class="string">            if ($this-&gt;has8bitChars($domain) &amp;&amp; @mb_check_encoding($domain, $this-&gt;CharSet)) &#123;</span></span><br><span class="line"><span class="string">                $domain = mb_convert_encoding($domain, &#x27;</span>UTF-8<span class="string">&#x27;, $this-&gt;CharSet);</span></span><br><span class="line"><span class="string">                //Ignore IDE complaints about this line - method signature changed in PHP 5.4</span></span><br><span class="line"><span class="string">                $errorcode = 0;</span></span><br><span class="line"><span class="string">                if (defined(&#x27;</span>INTL_IDNA_VARIANT_UTS46<span class="string">&#x27;)) &#123;</span></span><br><span class="line"><span class="string">                    $punycode = idn_to_ascii($domain, $errorcode, INTL_IDNA_VARIANT_UTS46);</span></span><br><span class="line"><span class="string">                &#125; elseif (defined(&#x27;</span>INTL_IDNA_VARIANT_2003<span class="string">&#x27;)) &#123;</span></span><br><span class="line"><span class="string">                    $punycode = idn_to_ascii($domain, $errorcode, INTL_IDNA_VARIANT_2003);</span></span><br><span class="line"><span class="string">                &#125; else &#123;</span></span><br><span class="line"><span class="string">                    $punycode = idn_to_ascii($domain, $errorcode);</span></span><br><span class="line"><span class="string">                &#125;</span></span><br><span class="line"><span class="string">                if (false !== $punycode) &#123;</span></span><br><span class="line"><span class="string">                    return substr($address, 0, $pos) . $punycode;</span></span><br><span class="line"><span class="string">                &#125;</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        return $address;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Create a message and send it.</span></span><br><span class="line"><span class="string">     * Uses the sending method specified by $Mailer.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @throws Exception</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return bool false on error - See the ErrorInfo property for details of the error</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function send()</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        try &#123;</span></span><br><span class="line"><span class="string">            if (!$this-&gt;preSend()) &#123;</span></span><br><span class="line"><span class="string">                return false;</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">            return $this-&gt;postSend();</span></span><br><span class="line"><span class="string">        &#125; catch (Exception $exc) &#123;</span></span><br><span class="line"><span class="string">            $this-&gt;mailHeader = &#x27;</span><span class="string">&#x27;;</span></span><br><span class="line"><span class="string">            $this-&gt;setError($exc-&gt;getMessage());</span></span><br><span class="line"><span class="string">            if ($this-&gt;exceptions) &#123;</span></span><br><span class="line"><span class="string">                throw $exc;</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">            return false;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Prepare a message for sending.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @throws Exception</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return bool</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function preSend()</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        if (&#x27;</span>smtp<span class="string">&#x27; === $this-&gt;Mailer</span></span><br><span class="line"><span class="string">            || (&#x27;</span>mail<span class="string">&#x27; === $this-&gt;Mailer &amp;&amp; stripos(PHP_OS, &#x27;</span>WIN<span class="string">&#x27;) === 0)</span></span><br><span class="line"><span class="string">        ) &#123;</span></span><br><span class="line"><span class="string">            //SMTP mandates RFC-compliant line endings</span></span><br><span class="line"><span class="string">            //and it&#x27;</span>s also used with mail() on Windows</span><br><span class="line">            static::setLE(self::CRLF);</span><br><span class="line">        &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">            //Maintain backward compatibility with legacy Linux <span class="built_in">command</span> line mailers</span><br><span class="line">            static::setLE(PHP_EOL);</span><br><span class="line">        &#125;</span><br><span class="line">        //Check <span class="keyword">for</span> buggy PHP versions that add a header with an incorrect line <span class="built_in">break</span></span><br><span class="line">        <span class="keyword">if</span> (<span class="string">&#x27;mail&#x27;</span> === <span class="variable">$this</span>-&gt;Mailer</span><br><span class="line">            &amp;&amp; ((PHP_VERSION_ID &gt;= <span class="number">70000</span> &amp;&amp; PHP_VERSION_ID &lt; <span class="number">70017</span>)</span><br><span class="line">                || (PHP_VERSION_ID &gt;= <span class="number">70100</span> &amp;&amp; PHP_VERSION_ID &lt; <span class="number">70103</span>))</span><br><span class="line">            &amp;&amp; ini_get(<span class="string">&#x27;mail.add_x_header&#x27;</span>) === <span class="string">&#x27;1&#x27;</span></span><br><span class="line">            &amp;&amp; stripos(PHP_OS, <span class="string">&#x27;WIN&#x27;</span>) === 0</span><br><span class="line">        ) &#123;</span><br><span class="line">            trigger_error(</span><br><span class="line">                <span class="string">&#x27;Your version of PHP is affected by a bug that may result in corrupted messages.&#x27;</span> .</span><br><span class="line">                <span class="string">&#x27; To fix it, switch to sending using SMTP, disable the mail.add_x_header option in&#x27;</span> .</span><br><span class="line">                <span class="string">&#x27; your php.ini, switch to MacOS or Linux, or upgrade your PHP to version 7.0.17+ or 7.1.3+.&#x27;</span>,</span><br><span class="line">                E_USER_WARNING</span><br><span class="line">            );</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        try &#123;</span><br><span class="line">            <span class="variable">$this</span>-&gt;error_count = 0; // Reset errors</span><br><span class="line">            <span class="variable">$this</span>-&gt;mailHeader = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line"></span><br><span class="line">            // Dequeue recipient and Reply-To addresses with IDN</span><br><span class="line">            foreach (array_merge(<span class="variable">$this</span>-&gt;RecipientsQueue, <span class="variable">$this</span>-&gt;ReplyToQueue) as <span class="variable">$params</span>) &#123;</span><br><span class="line">                <span class="variable">$params</span>[1] = <span class="variable">$this</span>-&gt;punyencodeAddress(<span class="variable">$params</span>[1]);</span><br><span class="line">                call_user_func_array([<span class="variable">$this</span>, <span class="string">&#x27;addAnAddress&#x27;</span>], <span class="variable">$params</span>);</span><br><span class="line">            &#125;</span><br><span class="line">            <span class="keyword">if</span> (count(<span class="variable">$this</span>-&gt;to) + count(<span class="variable">$this</span>-&gt;cc) + count(<span class="variable">$this</span>-&gt;bcc) &lt; 1) &#123;</span><br><span class="line">                throw new Exception(<span class="variable">$this</span>-&gt;lang(<span class="string">&#x27;provide_address&#x27;</span>), self::STOP_CRITICAL);</span><br><span class="line">            &#125;</span><br><span class="line"></span><br><span class="line">            // Validate From, Sender, and ConfirmReadingTo addresses</span><br><span class="line">            foreach ([<span class="string">&#x27;From&#x27;</span>, <span class="string">&#x27;Sender&#x27;</span>, <span class="string">&#x27;ConfirmReadingTo&#x27;</span>] as <span class="variable">$address_kind</span>) &#123;</span><br><span class="line">                <span class="variable">$this</span>-&gt;<span class="variable">$address_kind</span> = trim(<span class="variable">$this</span>-&gt;<span class="variable">$address_kind</span>);</span><br><span class="line">                <span class="keyword">if</span> (empty(<span class="variable">$this</span>-&gt;<span class="variable">$address_kind</span>)) &#123;</span><br><span class="line">                    <span class="built_in">continue</span>;</span><br><span class="line">                &#125;</span><br><span class="line">                <span class="variable">$this</span>-&gt;<span class="variable">$address_kind</span> = <span class="variable">$this</span>-&gt;punyencodeAddress(<span class="variable">$this</span>-&gt;<span class="variable">$address_kind</span>);</span><br><span class="line">                <span class="keyword">if</span> (!static::validateAddress(<span class="variable">$this</span>-&gt;<span class="variable">$address_kind</span>)) &#123;</span><br><span class="line">                    <span class="variable">$error_message</span> = sprintf(</span><br><span class="line">                        <span class="string">&#x27;%s (%s): %s&#x27;</span>,</span><br><span class="line">                        <span class="variable">$this</span>-&gt;lang(<span class="string">&#x27;invalid_address&#x27;</span>),</span><br><span class="line">                        <span class="variable">$address_kind</span>,</span><br><span class="line">                        <span class="variable">$this</span>-&gt;<span class="variable">$address_kind</span></span><br><span class="line">                    );</span><br><span class="line">                    <span class="variable">$this</span>-&gt;setError(<span class="variable">$error_message</span>);</span><br><span class="line">                    <span class="variable">$this</span>-&gt;edebug(<span class="variable">$error_message</span>);</span><br><span class="line">                    <span class="keyword">if</span> (<span class="variable">$this</span>-&gt;exceptions) &#123;</span><br><span class="line">                        throw new Exception(<span class="variable">$error_message</span>);</span><br><span class="line">                    &#125;</span><br><span class="line"></span><br><span class="line">                    <span class="built_in">return</span> <span class="literal">false</span>;</span><br><span class="line">                &#125;</span><br><span class="line">            &#125;</span><br><span class="line"></span><br><span class="line">            // Set whether the message is multipart/alternative</span><br><span class="line">            <span class="keyword">if</span> (<span class="variable">$this</span>-&gt;alternativeExists()) &#123;</span><br><span class="line">                <span class="variable">$this</span>-&gt;ContentType = static::CONTENT_TYPE_MULTIPART_ALTERNATIVE;</span><br><span class="line">            &#125;</span><br><span class="line"></span><br><span class="line">            <span class="variable">$this</span>-&gt;setMessageType();</span><br><span class="line">            // Refuse to send an empty message unless we are specifically allowing it</span><br><span class="line">            <span class="keyword">if</span> (!<span class="variable">$this</span>-&gt;AllowEmpty &amp;&amp; empty(<span class="variable">$this</span>-&gt;Body)) &#123;</span><br><span class="line">                throw new Exception(<span class="variable">$this</span>-&gt;lang(<span class="string">&#x27;empty_message&#x27;</span>), self::STOP_CRITICAL);</span><br><span class="line">            &#125;</span><br><span class="line"></span><br><span class="line">            //Trim subject consistently</span><br><span class="line">            <span class="variable">$this</span>-&gt;Subject = trim(<span class="variable">$this</span>-&gt;Subject);</span><br><span class="line">            // Create body before headers <span class="keyword">in</span> <span class="keyword">case</span> body makes changes to headers (e.g. altering transfer encoding)</span><br><span class="line">            <span class="variable">$this</span>-&gt;MIMEHeader = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">            <span class="variable">$this</span>-&gt;MIMEBody = <span class="variable">$this</span>-&gt;createBody();</span><br><span class="line">            // createBody may have added some headers, so retain them</span><br><span class="line">            <span class="variable">$tempheaders</span> = <span class="variable">$this</span>-&gt;MIMEHeader;</span><br><span class="line">            <span class="variable">$this</span>-&gt;MIMEHeader = <span class="variable">$this</span>-&gt;createHeader();</span><br><span class="line">            <span class="variable">$this</span>-&gt;MIMEHeader .= <span class="variable">$tempheaders</span>;</span><br><span class="line"></span><br><span class="line">            // To capture the complete message when using mail(), create</span><br><span class="line">            // an extra header list <span class="built_in">which</span> createHeader() doesn<span class="string">&#x27;t fold in</span></span><br><span class="line"><span class="string">            if (&#x27;</span>mail<span class="string">&#x27; === $this-&gt;Mailer) &#123;</span></span><br><span class="line"><span class="string">                if (count($this-&gt;to) &gt; 0) &#123;</span></span><br><span class="line"><span class="string">                    $this-&gt;mailHeader .= $this-&gt;addrAppend(&#x27;</span>To<span class="string">&#x27;, $this-&gt;to);</span></span><br><span class="line"><span class="string">                &#125; else &#123;</span></span><br><span class="line"><span class="string">                    $this-&gt;mailHeader .= $this-&gt;headerLine(&#x27;</span>To<span class="string">&#x27;, &#x27;</span>undisclosed-recipients:;<span class="string">&#x27;);</span></span><br><span class="line"><span class="string">                &#125;</span></span><br><span class="line"><span class="string">                $this-&gt;mailHeader .= $this-&gt;headerLine(</span></span><br><span class="line"><span class="string">                    &#x27;</span>Subject<span class="string">&#x27;,</span></span><br><span class="line"><span class="string">                    $this-&gt;encodeHeader($this-&gt;secureHeader($this-&gt;Subject))</span></span><br><span class="line"><span class="string">                );</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">            // Sign with DKIM if enabled</span></span><br><span class="line"><span class="string">            if (!empty($this-&gt;DKIM_domain)</span></span><br><span class="line"><span class="string">                &amp;&amp; !empty($this-&gt;DKIM_selector)</span></span><br><span class="line"><span class="string">                &amp;&amp; (!empty($this-&gt;DKIM_private_string)</span></span><br><span class="line"><span class="string">                    || (!empty($this-&gt;DKIM_private)</span></span><br><span class="line"><span class="string">                        &amp;&amp; static::isPermittedPath($this-&gt;DKIM_private)</span></span><br><span class="line"><span class="string">                        &amp;&amp; file_exists($this-&gt;DKIM_private)</span></span><br><span class="line"><span class="string">                    )</span></span><br><span class="line"><span class="string">                )</span></span><br><span class="line"><span class="string">            ) &#123;</span></span><br><span class="line"><span class="string">                $header_dkim = $this-&gt;DKIM_Add(</span></span><br><span class="line"><span class="string">                    $this-&gt;MIMEHeader . $this-&gt;mailHeader,</span></span><br><span class="line"><span class="string">                    $this-&gt;encodeHeader($this-&gt;secureHeader($this-&gt;Subject)),</span></span><br><span class="line"><span class="string">                    $this-&gt;MIMEBody</span></span><br><span class="line"><span class="string">                );</span></span><br><span class="line"><span class="string">                $this-&gt;MIMEHeader = static::stripTrailingWSP($this-&gt;MIMEHeader) . static::$LE .</span></span><br><span class="line"><span class="string">                    static::normalizeBreaks($header_dkim) . static::$LE;</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">            return true;</span></span><br><span class="line"><span class="string">        &#125; catch (Exception $exc) &#123;</span></span><br><span class="line"><span class="string">            $this-&gt;setError($exc-&gt;getMessage());</span></span><br><span class="line"><span class="string">            if ($this-&gt;exceptions) &#123;</span></span><br><span class="line"><span class="string">                throw $exc;</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">            return false;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Actually send a message via the selected mechanism.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @throws Exception</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return bool</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function postSend()</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        try &#123;</span></span><br><span class="line"><span class="string">            // Choose the mailer and send through it</span></span><br><span class="line"><span class="string">            switch ($this-&gt;Mailer) &#123;</span></span><br><span class="line"><span class="string">                case &#x27;</span>sendmail<span class="string">&#x27;:</span></span><br><span class="line"><span class="string">                case &#x27;</span>qmail<span class="string">&#x27;:</span></span><br><span class="line"><span class="string">                    return $this-&gt;sendmailSend($this-&gt;MIMEHeader, $this-&gt;MIMEBody);</span></span><br><span class="line"><span class="string">                case &#x27;</span>smtp<span class="string">&#x27;:</span></span><br><span class="line"><span class="string">                    return $this-&gt;smtpSend($this-&gt;MIMEHeader, $this-&gt;MIMEBody);</span></span><br><span class="line"><span class="string">                case &#x27;</span>mail<span class="string">&#x27;:</span></span><br><span class="line"><span class="string">                    return $this-&gt;mailSend($this-&gt;MIMEHeader, $this-&gt;MIMEBody);</span></span><br><span class="line"><span class="string">                default:</span></span><br><span class="line"><span class="string">                    $sendMethod = $this-&gt;Mailer . &#x27;</span>Send<span class="string">&#x27;;</span></span><br><span class="line"><span class="string">                    if (method_exists($this, $sendMethod)) &#123;</span></span><br><span class="line"><span class="string">                        return $this-&gt;$sendMethod($this-&gt;MIMEHeader, $this-&gt;MIMEBody);</span></span><br><span class="line"><span class="string">                    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">                    return $this-&gt;mailSend($this-&gt;MIMEHeader, $this-&gt;MIMEBody);</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string">        &#125; catch (Exception $exc) &#123;</span></span><br><span class="line"><span class="string">            $this-&gt;setError($exc-&gt;getMessage());</span></span><br><span class="line"><span class="string">            $this-&gt;edebug($exc-&gt;getMessage());</span></span><br><span class="line"><span class="string">            if ($this-&gt;exceptions) &#123;</span></span><br><span class="line"><span class="string">                throw $exc;</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        return false;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Send mail using the $Sendmail program.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @see PHPMailer::$Sendmail</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string $header The message headers</span></span><br><span class="line"><span class="string">     * @param string $body   The message body</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @throws Exception</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return bool</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    protected function sendmailSend($header, $body)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        $header = static::stripTrailingWSP($header) . static::$LE . static::$LE;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        // CVE-2016-10033, CVE-2016-10045: Don&#x27;</span>t pass -f <span class="keyword">if</span> characters will be escaped.</span><br><span class="line">        <span class="keyword">if</span> (!empty(<span class="variable">$this</span>-&gt;Sender) &amp;&amp; self::isShellSafe(<span class="variable">$this</span>-&gt;Sender)) &#123;</span><br><span class="line">            <span class="keyword">if</span> (<span class="string">&#x27;qmail&#x27;</span> === <span class="variable">$this</span>-&gt;Mailer) &#123;</span><br><span class="line">                <span class="variable">$sendmailFmt</span> = <span class="string">&#x27;%s -f%s&#x27;</span>;</span><br><span class="line">            &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">                <span class="variable">$sendmailFmt</span> = <span class="string">&#x27;%s -oi -f%s -t&#x27;</span>;</span><br><span class="line">            &#125;</span><br><span class="line">        &#125; elseif (<span class="string">&#x27;qmail&#x27;</span> === <span class="variable">$this</span>-&gt;Mailer) &#123;</span><br><span class="line">            <span class="variable">$sendmailFmt</span> = <span class="string">&#x27;%s&#x27;</span>;</span><br><span class="line">        &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">            <span class="variable">$sendmailFmt</span> = <span class="string">&#x27;%s -oi -t&#x27;</span>;</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        <span class="variable">$sendmail</span> = sprintf(<span class="variable">$sendmailFmt</span>, escapeshellcmd(<span class="variable">$this</span>-&gt;Sendmail), <span class="variable">$this</span>-&gt;Sender);</span><br><span class="line"></span><br><span class="line">        <span class="keyword">if</span> (<span class="variable">$this</span>-&gt;SingleTo) &#123;</span><br><span class="line">            foreach (<span class="variable">$this</span>-&gt;SingleToArray as <span class="variable">$toAddr</span>) &#123;</span><br><span class="line">                <span class="variable">$mail</span> = @popen(<span class="variable">$sendmail</span>, <span class="string">&#x27;w&#x27;</span>);</span><br><span class="line">                <span class="keyword">if</span> (!<span class="variable">$mail</span>) &#123;</span><br><span class="line">                    throw new Exception(<span class="variable">$this</span>-&gt;lang(<span class="string">&#x27;execute&#x27;</span>) . <span class="variable">$this</span>-&gt;Sendmail, self::STOP_CRITICAL);</span><br><span class="line">                &#125;</span><br><span class="line">                fwrite(<span class="variable">$mail</span>, <span class="string">&#x27;To: &#x27;</span> . <span class="variable">$toAddr</span> . <span class="string">&quot;\n&quot;</span>);</span><br><span class="line">                fwrite(<span class="variable">$mail</span>, <span class="variable">$header</span>);</span><br><span class="line">                fwrite(<span class="variable">$mail</span>, <span class="variable">$body</span>);</span><br><span class="line">                <span class="variable">$result</span> = pclose(<span class="variable">$mail</span>);</span><br><span class="line">                <span class="variable">$this</span>-&gt;doCallback(</span><br><span class="line">                    (<span class="variable">$result</span> === 0),</span><br><span class="line">                    [<span class="variable">$toAddr</span>],</span><br><span class="line">                    <span class="variable">$this</span>-&gt;cc,</span><br><span class="line">                    <span class="variable">$this</span>-&gt;bcc,</span><br><span class="line">                    <span class="variable">$this</span>-&gt;Subject,</span><br><span class="line">                    <span class="variable">$body</span>,</span><br><span class="line">                    <span class="variable">$this</span>-&gt;From,</span><br><span class="line">                    []</span><br><span class="line">                );</span><br><span class="line">                <span class="keyword">if</span> (0 !== <span class="variable">$result</span>) &#123;</span><br><span class="line">                    throw new Exception(<span class="variable">$this</span>-&gt;lang(<span class="string">&#x27;execute&#x27;</span>) . <span class="variable">$this</span>-&gt;Sendmail, self::STOP_CRITICAL);</span><br><span class="line">                &#125;</span><br><span class="line">            &#125;</span><br><span class="line">        &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">            <span class="variable">$mail</span> = @popen(<span class="variable">$sendmail</span>, <span class="string">&#x27;w&#x27;</span>);</span><br><span class="line">            <span class="keyword">if</span> (!<span class="variable">$mail</span>) &#123;</span><br><span class="line">                throw new Exception(<span class="variable">$this</span>-&gt;lang(<span class="string">&#x27;execute&#x27;</span>) . <span class="variable">$this</span>-&gt;Sendmail, self::STOP_CRITICAL);</span><br><span class="line">            &#125;</span><br><span class="line">            fwrite(<span class="variable">$mail</span>, <span class="variable">$header</span>);</span><br><span class="line">            fwrite(<span class="variable">$mail</span>, <span class="variable">$body</span>);</span><br><span class="line">            <span class="variable">$result</span> = pclose(<span class="variable">$mail</span>);</span><br><span class="line">            <span class="variable">$this</span>-&gt;doCallback(</span><br><span class="line">                (<span class="variable">$result</span> === 0),</span><br><span class="line">                <span class="variable">$this</span>-&gt;to,</span><br><span class="line">                <span class="variable">$this</span>-&gt;cc,</span><br><span class="line">                <span class="variable">$this</span>-&gt;bcc,</span><br><span class="line">                <span class="variable">$this</span>-&gt;Subject,</span><br><span class="line">                <span class="variable">$body</span>,</span><br><span class="line">                <span class="variable">$this</span>-&gt;From,</span><br><span class="line">                []</span><br><span class="line">            );</span><br><span class="line">            <span class="keyword">if</span> (0 !== <span class="variable">$result</span>) &#123;</span><br><span class="line">                throw new Exception(<span class="variable">$this</span>-&gt;lang(<span class="string">&#x27;execute&#x27;</span>) . <span class="variable">$this</span>-&gt;Sendmail, self::STOP_CRITICAL);</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        <span class="built_in">return</span> <span class="literal">true</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Fix CVE-2016-10033 and CVE-2016-10045 by disallowing potentially unsafe shell characters.</span><br><span class="line">     * Note that escapeshellarg and escapeshellcmd are inadequate <span class="keyword">for</span> our purposes, especially on Windows.</span><br><span class="line">     *</span><br><span class="line">     * @see https://github.com/PHPMailer/PHPMailer/issues/924 CVE-2016-10045 bug report</span><br><span class="line">     *</span><br><span class="line">     * @param string <span class="variable">$string</span> The string to be validated</span><br><span class="line">     *</span><br><span class="line">     * @<span class="built_in">return</span> bool</span><br><span class="line">     */</span><br><span class="line">    protected static <span class="keyword">function</span> isShellSafe(<span class="variable">$string</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        // Future-proof</span><br><span class="line">        <span class="keyword">if</span> (escapeshellcmd(<span class="variable">$string</span>) !== <span class="variable">$string</span></span><br><span class="line">            || !in_array(escapeshellarg(<span class="variable">$string</span>), [<span class="string">&quot;&#x27;<span class="variable">$string</span>&#x27;&quot;</span>, <span class="string">&quot;\&quot;<span class="variable">$string</span>\&quot;&quot;</span>])</span><br><span class="line">        ) &#123;</span><br><span class="line">            <span class="built_in">return</span> <span class="literal">false</span>;</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        <span class="variable">$length</span> = strlen(<span class="variable">$string</span>);</span><br><span class="line"></span><br><span class="line">        <span class="keyword">for</span> (<span class="variable">$i</span> = 0; <span class="variable">$i</span> &lt; <span class="variable">$length</span>; ++<span class="variable">$i</span>) &#123;</span><br><span class="line">            <span class="variable">$c</span> = <span class="variable">$string</span>[<span class="variable">$i</span>];</span><br><span class="line"></span><br><span class="line">            // All other characters have a special meaning <span class="keyword">in</span> at least one common shell, including = and +.</span><br><span class="line">            // Full stop (.) has a special meaning <span class="keyword">in</span> cmd.exe, but its impact should be negligible here.</span><br><span class="line">            // Note that this does permit non-Latin alphanumeric characters based on the current locale.</span><br><span class="line">            <span class="keyword">if</span> (!ctype_alnum(<span class="variable">$c</span>) &amp;&amp; strpos(<span class="string">&#x27;@_-.&#x27;</span>, <span class="variable">$c</span>) === <span class="literal">false</span>) &#123;</span><br><span class="line">                <span class="built_in">return</span> <span class="literal">false</span>;</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        <span class="built_in">return</span> <span class="literal">true</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Check whether a file path is of a permitted <span class="built_in">type</span>.</span><br><span class="line">     * Used to reject URLs and phar files from <span class="built_in">functions</span> that access <span class="built_in">local</span> file paths,</span><br><span class="line">     * such as addAttachment.</span><br><span class="line">     *</span><br><span class="line">     * @param string <span class="variable">$path</span> A relative or absolute path to a file</span><br><span class="line">     *</span><br><span class="line">     * @<span class="built_in">return</span> bool</span><br><span class="line">     */</span><br><span class="line">    protected static <span class="keyword">function</span> isPermittedPath(<span class="variable">$path</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="built_in">return</span> !preg_match(<span class="string">&#x27;#^[a-z]+://#i&#x27;</span>, <span class="variable">$path</span>);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Send mail using the PHP mail() <span class="keyword">function</span>.</span><br><span class="line">     *</span><br><span class="line">     * @see http://www.php.net/manual/en/book.mail.php</span><br><span class="line">     *</span><br><span class="line">     * @param string <span class="variable">$header</span> The message headers</span><br><span class="line">     * @param string <span class="variable">$body</span>   The message body</span><br><span class="line">     *</span><br><span class="line">     * @throws Exception</span><br><span class="line">     *</span><br><span class="line">     * @<span class="built_in">return</span> bool</span><br><span class="line">     */</span><br><span class="line">    protected <span class="keyword">function</span> mailSend(<span class="variable">$header</span>, <span class="variable">$body</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="variable">$header</span> = static::stripTrailingWSP(<span class="variable">$header</span>) . static::<span class="variable">$LE</span> . static::<span class="variable">$LE</span>;</span><br><span class="line"></span><br><span class="line">        <span class="variable">$toArr</span> = [];</span><br><span class="line">        foreach (<span class="variable">$this</span>-&gt;to as <span class="variable">$toaddr</span>) &#123;</span><br><span class="line">            <span class="variable">$toArr</span>[] = <span class="variable">$this</span>-&gt;addrFormat(<span class="variable">$toaddr</span>);</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="variable">$to</span> = implode(<span class="string">&#x27;, &#x27;</span>, <span class="variable">$toArr</span>);</span><br><span class="line"></span><br><span class="line">        <span class="variable">$params</span> = null;</span><br><span class="line">        //This sets the SMTP envelope sender <span class="built_in">which</span> gets turned into a return-path header by the receiver</span><br><span class="line">        //A space after `-f` is optional, but there is a long <span class="built_in">history</span> of its presence</span><br><span class="line">        //causing problems, so we don<span class="string">&#x27;t use one</span></span><br><span class="line"><span class="string">        //Exim docs: http://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_exim_command_line.html</span></span><br><span class="line"><span class="string">        //Sendmail docs: http://www.sendmail.org/~ca/email/man/sendmail.html</span></span><br><span class="line"><span class="string">        //Qmail docs: http://www.qmail.org/man/man8/qmail-inject.html</span></span><br><span class="line"><span class="string">        //Example problem: https://www.drupal.org/node/1057954</span></span><br><span class="line"><span class="string">        // CVE-2016-10033, CVE-2016-10045: Don&#x27;</span>t pass -f <span class="keyword">if</span> characters will be escaped.</span><br><span class="line">        <span class="keyword">if</span> (!empty(<span class="variable">$this</span>-&gt;Sender) &amp;&amp; static::validateAddress(<span class="variable">$this</span>-&gt;Sender) &amp;&amp; self::isShellSafe(<span class="variable">$this</span>-&gt;Sender)) &#123;</span><br><span class="line">            <span class="variable">$params</span> = sprintf(<span class="string">&#x27;-f%s&#x27;</span>, <span class="variable">$this</span>-&gt;Sender);</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="keyword">if</span> (!empty(<span class="variable">$this</span>-&gt;Sender) &amp;&amp; static::validateAddress(<span class="variable">$this</span>-&gt;Sender)) &#123;</span><br><span class="line">            <span class="variable">$old_from</span> = ini_get(<span class="string">&#x27;sendmail_from&#x27;</span>);</span><br><span class="line">            ini_set(<span class="string">&#x27;sendmail_from&#x27;</span>, <span class="variable">$this</span>-&gt;Sender);</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="variable">$result</span> = <span class="literal">false</span>;</span><br><span class="line">        <span class="keyword">if</span> (<span class="variable">$this</span>-&gt;SingleTo &amp;&amp; count(<span class="variable">$toArr</span>) &gt; 1) &#123;</span><br><span class="line">            foreach (<span class="variable">$toArr</span> as <span class="variable">$toAddr</span>) &#123;</span><br><span class="line">                <span class="variable">$result</span> = <span class="variable">$this</span>-&gt;mailPassthru(<span class="variable">$toAddr</span>, <span class="variable">$this</span>-&gt;Subject, <span class="variable">$body</span>, <span class="variable">$header</span>, <span class="variable">$params</span>);</span><br><span class="line">                <span class="variable">$this</span>-&gt;doCallback(<span class="variable">$result</span>, [<span class="variable">$toAddr</span>], <span class="variable">$this</span>-&gt;cc, <span class="variable">$this</span>-&gt;bcc, <span class="variable">$this</span>-&gt;Subject, <span class="variable">$body</span>, <span class="variable">$this</span>-&gt;From, []);</span><br><span class="line">            &#125;</span><br><span class="line">        &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">            <span class="variable">$result</span> = <span class="variable">$this</span>-&gt;mailPassthru(<span class="variable">$to</span>, <span class="variable">$this</span>-&gt;Subject, <span class="variable">$body</span>, <span class="variable">$header</span>, <span class="variable">$params</span>);</span><br><span class="line">            <span class="variable">$this</span>-&gt;doCallback(<span class="variable">$result</span>, <span class="variable">$this</span>-&gt;to, <span class="variable">$this</span>-&gt;cc, <span class="variable">$this</span>-&gt;bcc, <span class="variable">$this</span>-&gt;Subject, <span class="variable">$body</span>, <span class="variable">$this</span>-&gt;From, []);</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="keyword">if</span> (isset(<span class="variable">$old_from</span>)) &#123;</span><br><span class="line">            ini_set(<span class="string">&#x27;sendmail_from&#x27;</span>, <span class="variable">$old_from</span>);</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="keyword">if</span> (!<span class="variable">$result</span>) &#123;</span><br><span class="line">            throw new Exception(<span class="variable">$this</span>-&gt;lang(<span class="string">&#x27;instantiate&#x27;</span>), self::STOP_CRITICAL);</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        <span class="built_in">return</span> <span class="literal">true</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Get an instance to use <span class="keyword">for</span> SMTP operations.</span><br><span class="line">     * Override this <span class="keyword">function</span> to load your own SMTP implementation,</span><br><span class="line">     * or <span class="built_in">set</span> one with setSMTPInstance.</span><br><span class="line">     *</span><br><span class="line">     * @<span class="built_in">return</span> SMTP</span><br><span class="line">     */</span><br><span class="line">    public <span class="keyword">function</span> <span class="function"><span class="title">getSMTPInstance</span></span>()</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="keyword">if</span> (!is_object(<span class="variable">$this</span>-&gt;smtp)) &#123;</span><br><span class="line">            <span class="variable">$this</span>-&gt;smtp = new SMTP();</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        <span class="built_in">return</span> <span class="variable">$this</span>-&gt;smtp;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Provide an instance to use <span class="keyword">for</span> SMTP operations.</span><br><span class="line">     *</span><br><span class="line">     * @<span class="built_in">return</span> SMTP</span><br><span class="line">     */</span><br><span class="line">    public <span class="keyword">function</span> setSMTPInstance(SMTP <span class="variable">$smtp</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="variable">$this</span>-&gt;smtp = <span class="variable">$smtp</span>;</span><br><span class="line"></span><br><span class="line">        <span class="built_in">return</span> <span class="variable">$this</span>-&gt;smtp;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Send mail via SMTP.</span><br><span class="line">     * Returns <span class="literal">false</span> <span class="keyword">if</span> there is a bad MAIL FROM, RCPT, or DATA input.</span><br><span class="line">     *</span><br><span class="line">     * @see PHPMailer::setSMTPInstance() to use a different class.</span><br><span class="line">     *</span><br><span class="line">     * @uses \PHPMailer\PHPMailer\SMTP</span><br><span class="line">     *</span><br><span class="line">     * @param string <span class="variable">$header</span> The message headers</span><br><span class="line">     * @param string <span class="variable">$body</span>   The message body</span><br><span class="line">     *</span><br><span class="line">     * @throws Exception</span><br><span class="line">     *</span><br><span class="line">     * @<span class="built_in">return</span> bool</span><br><span class="line">     */</span><br><span class="line">    protected <span class="keyword">function</span> smtpSend(<span class="variable">$header</span>, <span class="variable">$body</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="variable">$header</span> = static::stripTrailingWSP(<span class="variable">$header</span>) . static::<span class="variable">$LE</span> . static::<span class="variable">$LE</span>;</span><br><span class="line">        <span class="variable">$bad_rcpt</span> = [];</span><br><span class="line">        <span class="keyword">if</span> (!<span class="variable">$this</span>-&gt;smtpConnect(<span class="variable">$this</span>-&gt;SMTPOptions)) &#123;</span><br><span class="line">            throw new Exception(<span class="variable">$this</span>-&gt;lang(<span class="string">&#x27;smtp_connect_failed&#x27;</span>), self::STOP_CRITICAL);</span><br><span class="line">        &#125;</span><br><span class="line">        //Sender already validated <span class="keyword">in</span> preSend()</span><br><span class="line">        <span class="keyword">if</span> (<span class="string">&#x27;&#x27;</span> === <span class="variable">$this</span>-&gt;Sender) &#123;</span><br><span class="line">            <span class="variable">$smtp_from</span> = <span class="variable">$this</span>-&gt;From;</span><br><span class="line">        &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">            <span class="variable">$smtp_from</span> = <span class="variable">$this</span>-&gt;Sender;</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="keyword">if</span> (!<span class="variable">$this</span>-&gt;smtp-&gt;mail(<span class="variable">$smtp_from</span>)) &#123;</span><br><span class="line">            <span class="variable">$this</span>-&gt;setError(<span class="variable">$this</span>-&gt;lang(<span class="string">&#x27;from_failed&#x27;</span>) . <span class="variable">$smtp_from</span> . <span class="string">&#x27; : &#x27;</span> . implode(<span class="string">&#x27;,&#x27;</span>, <span class="variable">$this</span>-&gt;smtp-&gt;getError()));</span><br><span class="line">            throw new Exception(<span class="variable">$this</span>-&gt;ErrorInfo, self::STOP_CRITICAL);</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        <span class="variable">$callbacks</span> = [];</span><br><span class="line">        // Attempt to send to all recipients</span><br><span class="line">        foreach ([<span class="variable">$this</span>-&gt;to, <span class="variable">$this</span>-&gt;cc, <span class="variable">$this</span>-&gt;bcc] as <span class="variable">$togroup</span>) &#123;</span><br><span class="line">            foreach (<span class="variable">$togroup</span> as <span class="variable">$to</span>) &#123;</span><br><span class="line">                <span class="keyword">if</span> (!<span class="variable">$this</span>-&gt;smtp-&gt;recipient(<span class="variable">$to</span>[0], <span class="variable">$this</span>-&gt;dsn)) &#123;</span><br><span class="line">                    <span class="variable">$error</span> = <span class="variable">$this</span>-&gt;smtp-&gt;getError();</span><br><span class="line">                    <span class="variable">$bad_rcpt</span>[] = [<span class="string">&#x27;to&#x27;</span> =&gt; <span class="variable">$to</span>[0], <span class="string">&#x27;error&#x27;</span> =&gt; <span class="variable">$error</span>[<span class="string">&#x27;detail&#x27;</span>]];</span><br><span class="line">                    <span class="variable">$isSent</span> = <span class="literal">false</span>;</span><br><span class="line">                &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">                    <span class="variable">$isSent</span> = <span class="literal">true</span>;</span><br><span class="line">                &#125;</span><br><span class="line"></span><br><span class="line">                <span class="variable">$callbacks</span>[] = [<span class="string">&#x27;issent&#x27;</span>=&gt;<span class="variable">$isSent</span>, <span class="string">&#x27;to&#x27;</span>=&gt;<span class="variable">$to</span>[0]];</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        // Only send the DATA <span class="built_in">command</span> <span class="keyword">if</span> we have viable recipients</span><br><span class="line">        <span class="keyword">if</span> ((count(<span class="variable">$this</span>-&gt;all_recipients) &gt; count(<span class="variable">$bad_rcpt</span>)) &amp;&amp; !<span class="variable">$this</span>-&gt;smtp-&gt;data(<span class="variable">$header</span> . <span class="variable">$body</span>)) &#123;</span><br><span class="line">            throw new Exception(<span class="variable">$this</span>-&gt;lang(<span class="string">&#x27;data_not_accepted&#x27;</span>), self::STOP_CRITICAL);</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        <span class="variable">$smtp_transaction_id</span> = <span class="variable">$this</span>-&gt;smtp-&gt;getLastTransactionID();</span><br><span class="line"></span><br><span class="line">        <span class="keyword">if</span> (<span class="variable">$this</span>-&gt;SMTPKeepAlive) &#123;</span><br><span class="line">            <span class="variable">$this</span>-&gt;smtp-&gt;reset();</span><br><span class="line">        &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">            <span class="variable">$this</span>-&gt;smtp-&gt;quit();</span><br><span class="line">            <span class="variable">$this</span>-&gt;smtp-&gt;close();</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        foreach (<span class="variable">$callbacks</span> as <span class="variable">$cb</span>) &#123;</span><br><span class="line">            <span class="variable">$this</span>-&gt;doCallback(</span><br><span class="line">                <span class="variable">$cb</span>[<span class="string">&#x27;issent&#x27;</span>],</span><br><span class="line">                [<span class="variable">$cb</span>[<span class="string">&#x27;to&#x27;</span>]],</span><br><span class="line">                [],</span><br><span class="line">                [],</span><br><span class="line">                <span class="variable">$this</span>-&gt;Subject,</span><br><span class="line">                <span class="variable">$body</span>,</span><br><span class="line">                <span class="variable">$this</span>-&gt;From,</span><br><span class="line">                [<span class="string">&#x27;smtp_transaction_id&#x27;</span> =&gt; <span class="variable">$smtp_transaction_id</span>]</span><br><span class="line">            );</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        //Create error message <span class="keyword">for</span> any bad addresses</span><br><span class="line">        <span class="keyword">if</span> (count(<span class="variable">$bad_rcpt</span>) &gt; 0) &#123;</span><br><span class="line">            <span class="variable">$errstr</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">            foreach (<span class="variable">$bad_rcpt</span> as <span class="variable">$bad</span>) &#123;</span><br><span class="line">                <span class="variable">$errstr</span> .= <span class="variable">$bad</span>[<span class="string">&#x27;to&#x27;</span>] . <span class="string">&#x27;: &#x27;</span> . <span class="variable">$bad</span>[<span class="string">&#x27;error&#x27;</span>];</span><br><span class="line">            &#125;</span><br><span class="line">            throw new Exception(<span class="variable">$this</span>-&gt;lang(<span class="string">&#x27;recipients_failed&#x27;</span>) . <span class="variable">$errstr</span>, self::STOP_CONTINUE);</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        <span class="built_in">return</span> <span class="literal">true</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Initiate a connection to an SMTP server.</span><br><span class="line">     * Returns <span class="literal">false</span> <span class="keyword">if</span> the operation failed.</span><br><span class="line">     *</span><br><span class="line">     * @param array <span class="variable">$options</span> An array of options compatible with stream_context_create()</span><br><span class="line">     *</span><br><span class="line">     * @throws Exception</span><br><span class="line">     *</span><br><span class="line">     * @uses \PHPMailer\PHPMailer\SMTP</span><br><span class="line">     *</span><br><span class="line">     * @<span class="built_in">return</span> bool</span><br><span class="line">     */</span><br><span class="line">    public <span class="keyword">function</span> smtpConnect(<span class="variable">$options</span> = null)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="keyword">if</span> (null === <span class="variable">$this</span>-&gt;smtp) &#123;</span><br><span class="line">            <span class="variable">$this</span>-&gt;smtp = <span class="variable">$this</span>-&gt;getSMTPInstance();</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        //If no options are provided, use whatever is <span class="built_in">set</span> <span class="keyword">in</span> the instance</span><br><span class="line">        <span class="keyword">if</span> (null === <span class="variable">$options</span>) &#123;</span><br><span class="line">            <span class="variable">$options</span> = <span class="variable">$this</span>-&gt;SMTPOptions;</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        // Already connected?</span><br><span class="line">        <span class="keyword">if</span> (<span class="variable">$this</span>-&gt;smtp-&gt;connected()) &#123;</span><br><span class="line">            <span class="built_in">return</span> <span class="literal">true</span>;</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        <span class="variable">$this</span>-&gt;smtp-&gt;setTimeout(<span class="variable">$this</span>-&gt;Timeout);</span><br><span class="line">        <span class="variable">$this</span>-&gt;smtp-&gt;setDebugLevel(<span class="variable">$this</span>-&gt;SMTPDebug);</span><br><span class="line">        <span class="variable">$this</span>-&gt;smtp-&gt;setDebugOutput(<span class="variable">$this</span>-&gt;Debugoutput);</span><br><span class="line">        <span class="variable">$this</span>-&gt;smtp-&gt;setVerp(<span class="variable">$this</span>-&gt;do_verp);</span><br><span class="line">        <span class="variable">$hosts</span> = explode(<span class="string">&#x27;;&#x27;</span>, <span class="variable">$this</span>-&gt;Host);</span><br><span class="line">        <span class="variable">$lastexception</span> = null;</span><br><span class="line">        foreach (<span class="variable">$hosts</span> as <span class="variable">$hostentry</span>) &#123;</span><br><span class="line">            <span class="variable">$hostinfo</span> = [];</span><br><span class="line">            <span class="keyword">if</span> (!preg_match(</span><br><span class="line">                <span class="string">&#x27;/^(?:(ssl|tls):\/\/)?(.+?)(?::(\d+))?$/&#x27;</span>,</span><br><span class="line">                trim(<span class="variable">$hostentry</span>),</span><br><span class="line">                <span class="variable">$hostinfo</span></span><br><span class="line">            )) &#123;</span><br><span class="line">                <span class="variable">$this</span>-&gt;edebug(<span class="variable">$this</span>-&gt;lang(<span class="string">&#x27;invalid_hostentry&#x27;</span>) . <span class="string">&#x27; &#x27;</span> . trim(<span class="variable">$hostentry</span>));</span><br><span class="line">                // Not a valid host entry</span><br><span class="line">                <span class="built_in">continue</span>;</span><br><span class="line">            &#125;</span><br><span class="line">            // <span class="variable">$hostinfo</span>[1]: optional ssl or tls prefix</span><br><span class="line">            // <span class="variable">$hostinfo</span>[2]: the hostname</span><br><span class="line">            // <span class="variable">$hostinfo</span>[3]: optional port number</span><br><span class="line">            // The host string prefix can temporarily override the current setting <span class="keyword">for</span> SMTPSecure</span><br><span class="line">            // If it<span class="string">&#x27;s not specified, the default value is used</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">            //Check the host name is a valid name or IP address before trying to use it</span></span><br><span class="line"><span class="string">            if (!static::isValidHost($hostinfo[2])) &#123;</span></span><br><span class="line"><span class="string">                $this-&gt;edebug($this-&gt;lang(&#x27;</span>invalid_host<span class="string">&#x27;) . &#x27;</span> <span class="string">&#x27; . $hostinfo[2]);</span></span><br><span class="line"><span class="string">                continue;</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string">            $prefix = &#x27;</span><span class="string">&#x27;;</span></span><br><span class="line"><span class="string">            $secure = $this-&gt;SMTPSecure;</span></span><br><span class="line"><span class="string">            $tls = (static::ENCRYPTION_STARTTLS === $this-&gt;SMTPSecure);</span></span><br><span class="line"><span class="string">            if (&#x27;</span>ssl<span class="string">&#x27; === $hostinfo[1] || (&#x27;</span><span class="string">&#x27; === $hostinfo[1] &amp;&amp; static::ENCRYPTION_SMTPS === $this-&gt;SMTPSecure)) &#123;</span></span><br><span class="line"><span class="string">                $prefix = &#x27;</span>ssl://<span class="string">&#x27;;</span></span><br><span class="line"><span class="string">                $tls = false; // Can&#x27;</span>t have SSL and TLS at the same time</span><br><span class="line">                <span class="variable">$secure</span> = static::ENCRYPTION_SMTPS;</span><br><span class="line">            &#125; elseif (<span class="string">&#x27;tls&#x27;</span> === <span class="variable">$hostinfo</span>[1]) &#123;</span><br><span class="line">                <span class="variable">$tls</span> = <span class="literal">true</span>;</span><br><span class="line">                // tls doesn<span class="string">&#x27;t use a prefix</span></span><br><span class="line"><span class="string">                $secure = static::ENCRYPTION_STARTTLS;</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string">            //Do we need the OpenSSL extension?</span></span><br><span class="line"><span class="string">            $sslext = defined(&#x27;</span>OPENSSL_ALGO_SHA256<span class="string">&#x27;);</span></span><br><span class="line"><span class="string">            if (static::ENCRYPTION_STARTTLS === $secure || static::ENCRYPTION_SMTPS === $secure) &#123;</span></span><br><span class="line"><span class="string">                //Check for an OpenSSL constant rather than using extension_loaded, which is sometimes disabled</span></span><br><span class="line"><span class="string">                if (!$sslext) &#123;</span></span><br><span class="line"><span class="string">                    throw new Exception($this-&gt;lang(&#x27;</span>extension_missing<span class="string">&#x27;) . &#x27;</span>openssl<span class="string">&#x27;, self::STOP_CRITICAL);</span></span><br><span class="line"><span class="string">                &#125;</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">            $host = $hostinfo[2];</span></span><br><span class="line"><span class="string">            $port = $this-&gt;Port;</span></span><br><span class="line"><span class="string">            if (array_key_exists(3, $hostinfo) &amp;&amp; is_numeric($hostinfo[3]) &amp;&amp; $hostinfo[3] &gt; 0 &amp;&amp; $hostinfo[3] &lt; 65536) &#123;</span></span><br><span class="line"><span class="string">                $port = (int) $hostinfo[3];</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string">//            var_dump($prefix . $host);die;</span></span><br><span class="line"><span class="string">            if ($this-&gt;smtp-&gt;connect($prefix . $host, $port, $this-&gt;Timeout, $options)) &#123;</span></span><br><span class="line"><span class="string">                try &#123;</span></span><br><span class="line"><span class="string">                    if ($this-&gt;Helo) &#123;</span></span><br><span class="line"><span class="string">                        $hello = $this-&gt;Helo;</span></span><br><span class="line"><span class="string">                    &#125; else &#123;</span></span><br><span class="line"><span class="string">                        $hello = $this-&gt;serverHostname();</span></span><br><span class="line"><span class="string">                    &#125;</span></span><br><span class="line"><span class="string">                    $this-&gt;smtp-&gt;hello($hello);</span></span><br><span class="line"><span class="string">                    //Automatically enable TLS encryption if:</span></span><br><span class="line"><span class="string">                    // * it&#x27;</span>s not disabled</span><br><span class="line">                    // * we have openssl extension</span><br><span class="line">                    // * we are not already using SSL</span><br><span class="line">                    // * the server offers STARTTLS</span><br><span class="line">                    <span class="keyword">if</span> (<span class="variable">$this</span>-&gt;SMTPAutoTLS &amp;&amp; <span class="variable">$sslext</span> &amp;&amp; <span class="string">&#x27;ssl&#x27;</span> !== <span class="variable">$secure</span> &amp;&amp; <span class="variable">$this</span>-&gt;smtp-&gt;getServerExt(<span class="string">&#x27;STARTTLS&#x27;</span>)) &#123;</span><br><span class="line">                        <span class="variable">$tls</span> = <span class="literal">true</span>;</span><br><span class="line">                    &#125;</span><br><span class="line">                    <span class="keyword">if</span> (<span class="variable">$tls</span>) &#123;</span><br><span class="line">                        <span class="keyword">if</span> (!<span class="variable">$this</span>-&gt;smtp-&gt;startTLS()) &#123;</span><br><span class="line">                            throw new Exception(<span class="variable">$this</span>-&gt;lang(<span class="string">&#x27;connect_host&#x27;</span>));</span><br><span class="line">                        &#125;</span><br><span class="line">                        // We must resend EHLO after TLS negotiation</span><br><span class="line">                        <span class="variable">$this</span>-&gt;smtp-&gt;hello(<span class="variable">$hello</span>);</span><br><span class="line">                    &#125;</span><br><span class="line">                    <span class="keyword">if</span> (<span class="variable">$this</span>-&gt;SMTPAuth &amp;&amp; !<span class="variable">$this</span>-&gt;smtp-&gt;authenticate(</span><br><span class="line">                        <span class="variable">$this</span>-&gt;Username,</span><br><span class="line">                        <span class="variable">$this</span>-&gt;Password,</span><br><span class="line">                        <span class="variable">$this</span>-&gt;AuthType,</span><br><span class="line">                        <span class="variable">$this</span>-&gt;oauth</span><br><span class="line">                    )) &#123;</span><br><span class="line">                        throw new Exception(<span class="variable">$this</span>-&gt;lang(<span class="string">&#x27;authenticate&#x27;</span>));</span><br><span class="line">                    &#125;</span><br><span class="line"></span><br><span class="line">                    <span class="built_in">return</span> <span class="literal">true</span>;</span><br><span class="line">                &#125; catch (Exception <span class="variable">$exc</span>) &#123;</span><br><span class="line">                    <span class="variable">$lastexception</span> = <span class="variable">$exc</span>;</span><br><span class="line">                    <span class="variable">$this</span>-&gt;edebug(<span class="variable">$exc</span>-&gt;getMessage());</span><br><span class="line">                    // We must have connected, but <span class="keyword">then</span> failed TLS or Auth, so close connection nicely</span><br><span class="line">                    <span class="variable">$this</span>-&gt;smtp-&gt;quit();</span><br><span class="line">                &#125;</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line">        // If we get here, all connection attempts have failed, so close connection hard</span><br><span class="line">        <span class="variable">$this</span>-&gt;smtp-&gt;close();</span><br><span class="line">        // As we<span class="string">&#x27;ve caught all exceptions, just report whatever the last one was</span></span><br><span class="line"><span class="string">        if ($this-&gt;exceptions &amp;&amp; null !== $lastexception) &#123;</span></span><br><span class="line"><span class="string">            throw $lastexception;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        return false;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Close the active SMTP session if one exists.</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function smtpClose()</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        if ((null !== $this-&gt;smtp) &amp;&amp; $this-&gt;smtp-&gt;connected()) &#123;</span></span><br><span class="line"><span class="string">            $this-&gt;smtp-&gt;quit();</span></span><br><span class="line"><span class="string">            $this-&gt;smtp-&gt;close();</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Set the language for error messages.</span></span><br><span class="line"><span class="string">     * Returns false if it cannot load the language file.</span></span><br><span class="line"><span class="string">     * The default language is English.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string $langcode  ISO 639-1 2-character language code (e.g. French is &quot;fr&quot;)</span></span><br><span class="line"><span class="string">     * @param string $lang_path Path to the language file directory, with trailing separator (slash)</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return bool</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function setLanguage($langcode = &#x27;</span>en<span class="string">&#x27;, $lang_path = &#x27;</span><span class="string">&#x27;)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        // Backwards compatibility for renamed language codes</span></span><br><span class="line"><span class="string">        $renamed_langcodes = [</span></span><br><span class="line"><span class="string">            &#x27;</span>br<span class="string">&#x27; =&gt; &#x27;</span>pt_br<span class="string">&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;</span>cz<span class="string">&#x27; =&gt; &#x27;</span>cs<span class="string">&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;</span>dk<span class="string">&#x27; =&gt; &#x27;</span>da<span class="string">&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;</span>no<span class="string">&#x27; =&gt; &#x27;</span>nb<span class="string">&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;</span>se<span class="string">&#x27; =&gt; &#x27;</span>sv<span class="string">&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;</span>rs<span class="string">&#x27; =&gt; &#x27;</span>sr<span class="string">&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;</span>tg<span class="string">&#x27; =&gt; &#x27;</span>tl<span class="string">&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;</span>am<span class="string">&#x27; =&gt; &#x27;</span>hy<span class="string">&#x27;,</span></span><br><span class="line"><span class="string">        ];</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        if (isset($renamed_langcodes[$langcode])) &#123;</span></span><br><span class="line"><span class="string">            $langcode = $renamed_langcodes[$langcode];</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        // Define full set of translatable strings in English</span></span><br><span class="line"><span class="string">        $PHPMAILER_LANG = [</span></span><br><span class="line"><span class="string">            &#x27;</span>authenticate<span class="string">&#x27; =&gt; &#x27;</span>SMTP Error: Could not authenticate.<span class="string">&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;</span>connect_host<span class="string">&#x27; =&gt; &#x27;</span>SMTP Error: Could not connect to SMTP host.<span class="string">&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;</span>data_not_accepted<span class="string">&#x27; =&gt; &#x27;</span>SMTP Error: data not accepted.<span class="string">&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;</span>empty_message<span class="string">&#x27; =&gt; &#x27;</span>Message body empty<span class="string">&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;</span>encoding<span class="string">&#x27; =&gt; &#x27;</span>Unknown encoding: <span class="string">&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;</span>execute<span class="string">&#x27; =&gt; &#x27;</span>Could not execute: <span class="string">&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;</span>file_access<span class="string">&#x27; =&gt; &#x27;</span>Could not access file: <span class="string">&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;</span>file_open<span class="string">&#x27; =&gt; &#x27;</span>File Error: Could not open file: <span class="string">&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;</span>from_failed<span class="string">&#x27; =&gt; &#x27;</span>The following From address failed: <span class="string">&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;</span>instantiate<span class="string">&#x27; =&gt; &#x27;</span>Could not instantiate mail <span class="keyword">function</span>.<span class="string">&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;</span>invalid_address<span class="string">&#x27; =&gt; &#x27;</span>Invalid address: <span class="string">&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;</span>invalid_hostentry<span class="string">&#x27; =&gt; &#x27;</span>Invalid hostentry: <span class="string">&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;</span>invalid_host<span class="string">&#x27; =&gt; &#x27;</span>Invalid host: <span class="string">&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;</span>mailer_not_supported<span class="string">&#x27; =&gt; &#x27;</span> mailer is not supported.<span class="string">&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;</span>provide_address<span class="string">&#x27; =&gt; &#x27;</span>You must provide at least one recipient email address.<span class="string">&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;</span>recipients_failed<span class="string">&#x27; =&gt; &#x27;</span>SMTP Error: The following recipients failed: <span class="string">&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;</span>signing<span class="string">&#x27; =&gt; &#x27;</span>Signing Error: <span class="string">&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;</span>smtp_connect_failed<span class="string">&#x27; =&gt; &#x27;</span>SMTP connect() failed.<span class="string">&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;</span>smtp_error<span class="string">&#x27; =&gt; &#x27;</span>SMTP server error: <span class="string">&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;</span>variable_set<span class="string">&#x27; =&gt; &#x27;</span>Cannot <span class="built_in">set</span> or reset variable: <span class="string">&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;</span>extension_missing<span class="string">&#x27; =&gt; &#x27;</span>Extension missing: <span class="string">&#x27;,</span></span><br><span class="line"><span class="string">        ];</span></span><br><span class="line"><span class="string">        if (empty($lang_path)) &#123;</span></span><br><span class="line"><span class="string">            // Calculate an absolute path so it can work if CWD is not here</span></span><br><span class="line"><span class="string">            $lang_path = dirname(__DIR__) . DIRECTORY_SEPARATOR . &#x27;</span>language<span class="string">&#x27; . DIRECTORY_SEPARATOR;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        //Validate $langcode</span></span><br><span class="line"><span class="string">        if (!preg_match(&#x27;</span>/^[a-z]&#123;2&#125;(?:_[a-zA-Z]&#123;2&#125;)?$/<span class="string">&#x27;, $langcode)) &#123;</span></span><br><span class="line"><span class="string">            $langcode = &#x27;</span>en<span class="string">&#x27;;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        $foundlang = true;</span></span><br><span class="line"><span class="string">        $lang_file = $lang_path . &#x27;</span>phpmailer.lang-<span class="string">&#x27; . $langcode . &#x27;</span>.php<span class="string">&#x27;;</span></span><br><span class="line"><span class="string">        // There is no English translation file</span></span><br><span class="line"><span class="string">        if (&#x27;</span>en<span class="string">&#x27; !== $langcode) &#123;</span></span><br><span class="line"><span class="string">            // Make sure language file path is readable</span></span><br><span class="line"><span class="string">            if (!static::isPermittedPath($lang_file) || !file_exists($lang_file)) &#123;</span></span><br><span class="line"><span class="string">                $foundlang = false;</span></span><br><span class="line"><span class="string">            &#125; else &#123;</span></span><br><span class="line"><span class="string">                // Overwrite language-specific strings.</span></span><br><span class="line"><span class="string">                // This way we&#x27;</span>ll never have missing translation keys.</span><br><span class="line">                <span class="variable">$foundlang</span> = include <span class="variable">$lang_file</span>;</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="variable">$this</span>-&gt;language = <span class="variable">$PHPMAILER_LANG</span>;</span><br><span class="line"></span><br><span class="line">        <span class="built_in">return</span> (bool) <span class="variable">$foundlang</span>; // Returns <span class="literal">false</span> <span class="keyword">if</span> language not found</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Get the array of strings <span class="keyword">for</span> the current language.</span><br><span class="line">     *</span><br><span class="line">     * @<span class="built_in">return</span> array</span><br><span class="line">     */</span><br><span class="line">    public <span class="keyword">function</span> <span class="function"><span class="title">getTranslations</span></span>()</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="built_in">return</span> <span class="variable">$this</span>-&gt;language;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Create recipient headers.</span><br><span class="line">     *</span><br><span class="line">     * @param string <span class="variable">$type</span></span><br><span class="line">     * @param array  <span class="variable">$addr</span> An array of recipients,</span><br><span class="line">     *                     <span class="built_in">where</span> each recipient is a 2-element indexed array with element 0 containing an address</span><br><span class="line">     *                     and element 1 containing a name, like:</span><br><span class="line">     *                     [[<span class="string">&#x27;joe@example.com&#x27;</span>, <span class="string">&#x27;Joe User&#x27;</span>], [<span class="string">&#x27;zoe@example.com&#x27;</span>, <span class="string">&#x27;Zoe User&#x27;</span>]]</span><br><span class="line">     *</span><br><span class="line">     * @<span class="built_in">return</span> string</span><br><span class="line">     */</span><br><span class="line">    public <span class="keyword">function</span> addrAppend(<span class="variable">$type</span>, <span class="variable">$addr</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="variable">$addresses</span> = [];</span><br><span class="line">        foreach (<span class="variable">$addr</span> as <span class="variable">$address</span>) &#123;</span><br><span class="line">            <span class="variable">$addresses</span>[] = <span class="variable">$this</span>-&gt;addrFormat(<span class="variable">$address</span>);</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        <span class="built_in">return</span> <span class="variable">$type</span> . <span class="string">&#x27;: &#x27;</span> . implode(<span class="string">&#x27;, &#x27;</span>, <span class="variable">$addresses</span>) . static::<span class="variable">$LE</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Format an address <span class="keyword">for</span> use <span class="keyword">in</span> a message header.</span><br><span class="line">     *</span><br><span class="line">     * @param array <span class="variable">$addr</span> A 2-element indexed array, element 0 containing an address, element 1 containing a name like</span><br><span class="line">     *                    [<span class="string">&#x27;joe@example.com&#x27;</span>, <span class="string">&#x27;Joe User&#x27;</span>]</span><br><span class="line">     *</span><br><span class="line">     * @<span class="built_in">return</span> string</span><br><span class="line">     */</span><br><span class="line">    public <span class="keyword">function</span> addrFormat(<span class="variable">$addr</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="keyword">if</span> (empty(<span class="variable">$addr</span>[1])) &#123; // No name provided</span><br><span class="line">            <span class="built_in">return</span> <span class="variable">$this</span>-&gt;secureHeader(<span class="variable">$addr</span>[0]);</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        <span class="built_in">return</span> <span class="variable">$this</span>-&gt;encodeHeader(<span class="variable">$this</span>-&gt;secureHeader(<span class="variable">$addr</span>[1]), <span class="string">&#x27;phrase&#x27;</span>) .</span><br><span class="line">            <span class="string">&#x27; &lt;&#x27;</span> . <span class="variable">$this</span>-&gt;secureHeader(<span class="variable">$addr</span>[0]) . <span class="string">&#x27;&gt;&#x27;</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Word-wrap message.</span><br><span class="line">     * For use with mailers that <span class="keyword">do</span> not automatically perform wrapping</span><br><span class="line">     * and <span class="keyword">for</span> quoted-printable encoded messages.</span><br><span class="line">     * Original written by philippe.</span><br><span class="line">     *</span><br><span class="line">     * @param string <span class="variable">$message</span> The message to wrap</span><br><span class="line">     * @param int    <span class="variable">$length</span>  The line length to wrap to</span><br><span class="line">     * @param bool   <span class="variable">$qp_mode</span> Whether to run <span class="keyword">in</span> Quoted-Printable mode</span><br><span class="line">     *</span><br><span class="line">     * @<span class="built_in">return</span> string</span><br><span class="line">     */</span><br><span class="line">    public <span class="keyword">function</span> wrapText(<span class="variable">$message</span>, <span class="variable">$length</span>, <span class="variable">$qp_mode</span> = <span class="literal">false</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="keyword">if</span> (<span class="variable">$qp_mode</span>) &#123;</span><br><span class="line">            <span class="variable">$soft_break</span> = sprintf(<span class="string">&#x27; =%s&#x27;</span>, static::<span class="variable">$LE</span>);</span><br><span class="line">        &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">            <span class="variable">$soft_break</span> = static::<span class="variable">$LE</span>;</span><br><span class="line">        &#125;</span><br><span class="line">        // If utf-8 encoding is used, we will need to make sure we don<span class="string">&#x27;t</span></span><br><span class="line"><span class="string">        // split multibyte characters when we wrap</span></span><br><span class="line"><span class="string">        $is_utf8 = static::CHARSET_UTF8 === strtolower($this-&gt;CharSet);</span></span><br><span class="line"><span class="string">        $lelen = strlen(static::$LE);</span></span><br><span class="line"><span class="string">        $crlflen = strlen(static::$LE);</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        $message = static::normalizeBreaks($message);</span></span><br><span class="line"><span class="string">        //Remove a trailing line break</span></span><br><span class="line"><span class="string">        if (substr($message, -$lelen) === static::$LE) &#123;</span></span><br><span class="line"><span class="string">            $message = substr($message, 0, -$lelen);</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        //Split message into lines</span></span><br><span class="line"><span class="string">        $lines = explode(static::$LE, $message);</span></span><br><span class="line"><span class="string">        //Message will be rebuilt in here</span></span><br><span class="line"><span class="string">        $message = &#x27;</span><span class="string">&#x27;;</span></span><br><span class="line"><span class="string">        foreach ($lines as $line) &#123;</span></span><br><span class="line"><span class="string">            $words = explode(&#x27;</span> <span class="string">&#x27;, $line);</span></span><br><span class="line"><span class="string">            $buf = &#x27;</span><span class="string">&#x27;;</span></span><br><span class="line"><span class="string">            $firstword = true;</span></span><br><span class="line"><span class="string">            foreach ($words as $word) &#123;</span></span><br><span class="line"><span class="string">                if ($qp_mode &amp;&amp; (strlen($word) &gt; $length)) &#123;</span></span><br><span class="line"><span class="string">                    $space_left = $length - strlen($buf) - $crlflen;</span></span><br><span class="line"><span class="string">                    if (!$firstword) &#123;</span></span><br><span class="line"><span class="string">                        if ($space_left &gt; 20) &#123;</span></span><br><span class="line"><span class="string">                            $len = $space_left;</span></span><br><span class="line"><span class="string">                            if ($is_utf8) &#123;</span></span><br><span class="line"><span class="string">                                $len = $this-&gt;utf8CharBoundary($word, $len);</span></span><br><span class="line"><span class="string">                            &#125; elseif (&#x27;</span>=<span class="string">&#x27; === substr($word, $len - 1, 1)) &#123;</span></span><br><span class="line"><span class="string">                                --$len;</span></span><br><span class="line"><span class="string">                            &#125; elseif (&#x27;</span>=<span class="string">&#x27; === substr($word, $len - 2, 1)) &#123;</span></span><br><span class="line"><span class="string">                                $len -= 2;</span></span><br><span class="line"><span class="string">                            &#125;</span></span><br><span class="line"><span class="string">                            $part = substr($word, 0, $len);</span></span><br><span class="line"><span class="string">                            $word = substr($word, $len);</span></span><br><span class="line"><span class="string">                            $buf .= &#x27;</span> <span class="string">&#x27; . $part;</span></span><br><span class="line"><span class="string">                            $message .= $buf . sprintf(&#x27;</span>=%s<span class="string">&#x27;, static::$LE);</span></span><br><span class="line"><span class="string">                        &#125; else &#123;</span></span><br><span class="line"><span class="string">                            $message .= $buf . $soft_break;</span></span><br><span class="line"><span class="string">                        &#125;</span></span><br><span class="line"><span class="string">                        $buf = &#x27;</span><span class="string">&#x27;;</span></span><br><span class="line"><span class="string">                    &#125;</span></span><br><span class="line"><span class="string">                    while ($word !== &#x27;</span><span class="string">&#x27;) &#123;</span></span><br><span class="line"><span class="string">                        if ($length &lt;= 0) &#123;</span></span><br><span class="line"><span class="string">                            break;</span></span><br><span class="line"><span class="string">                        &#125;</span></span><br><span class="line"><span class="string">                        $len = $length;</span></span><br><span class="line"><span class="string">                        if ($is_utf8) &#123;</span></span><br><span class="line"><span class="string">                            $len = $this-&gt;utf8CharBoundary($word, $len);</span></span><br><span class="line"><span class="string">                        &#125; elseif (&#x27;</span>=<span class="string">&#x27; === substr($word, $len - 1, 1)) &#123;</span></span><br><span class="line"><span class="string">                            --$len;</span></span><br><span class="line"><span class="string">                        &#125; elseif (&#x27;</span>=<span class="string">&#x27; === substr($word, $len - 2, 1)) &#123;</span></span><br><span class="line"><span class="string">                            $len -= 2;</span></span><br><span class="line"><span class="string">                        &#125;</span></span><br><span class="line"><span class="string">                        $part = substr($word, 0, $len);</span></span><br><span class="line"><span class="string">                        $word = (string) substr($word, $len);</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">                        if ($word !== &#x27;</span><span class="string">&#x27;) &#123;</span></span><br><span class="line"><span class="string">                            $message .= $part . sprintf(&#x27;</span>=%s<span class="string">&#x27;, static::$LE);</span></span><br><span class="line"><span class="string">                        &#125; else &#123;</span></span><br><span class="line"><span class="string">                            $buf = $part;</span></span><br><span class="line"><span class="string">                        &#125;</span></span><br><span class="line"><span class="string">                    &#125;</span></span><br><span class="line"><span class="string">                &#125; else &#123;</span></span><br><span class="line"><span class="string">                    $buf_o = $buf;</span></span><br><span class="line"><span class="string">                    if (!$firstword) &#123;</span></span><br><span class="line"><span class="string">                        $buf .= &#x27;</span> <span class="string">&#x27;;</span></span><br><span class="line"><span class="string">                    &#125;</span></span><br><span class="line"><span class="string">                    $buf .= $word;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">                    if (&#x27;</span><span class="string">&#x27; !== $buf_o &amp;&amp; strlen($buf) &gt; $length) &#123;</span></span><br><span class="line"><span class="string">                        $message .= $buf_o . $soft_break;</span></span><br><span class="line"><span class="string">                        $buf = $word;</span></span><br><span class="line"><span class="string">                    &#125;</span></span><br><span class="line"><span class="string">                &#125;</span></span><br><span class="line"><span class="string">                $firstword = false;</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string">            $message .= $buf . static::$LE;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        return $message;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Find the last character boundary prior to $maxLength in a utf-8</span></span><br><span class="line"><span class="string">     * quoted-printable encoded string.</span></span><br><span class="line"><span class="string">     * Original written by Colin Brown.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string $encodedText utf-8 QP text</span></span><br><span class="line"><span class="string">     * @param int    $maxLength   Find the last character boundary prior to this length</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return int</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function utf8CharBoundary($encodedText, $maxLength)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        $foundSplitPos = false;</span></span><br><span class="line"><span class="string">        $lookBack = 3;</span></span><br><span class="line"><span class="string">        while (!$foundSplitPos) &#123;</span></span><br><span class="line"><span class="string">            $lastChunk = substr($encodedText, $maxLength - $lookBack, $lookBack);</span></span><br><span class="line"><span class="string">            $encodedCharPos = strpos($lastChunk, &#x27;</span>=<span class="string">&#x27;);</span></span><br><span class="line"><span class="string">            if (false !== $encodedCharPos) &#123;</span></span><br><span class="line"><span class="string">                // Found start of encoded character byte within $lookBack block.</span></span><br><span class="line"><span class="string">                // Check the encoded byte value (the 2 chars after the &#x27;</span>=<span class="string">&#x27;)</span></span><br><span class="line"><span class="string">                $hex = substr($encodedText, $maxLength - $lookBack + $encodedCharPos + 1, 2);</span></span><br><span class="line"><span class="string">                $dec = hexdec($hex);</span></span><br><span class="line"><span class="string">                if ($dec &lt; 128) &#123;</span></span><br><span class="line"><span class="string">                    // Single byte character.</span></span><br><span class="line"><span class="string">                    // If the encoded char was found at pos 0, it will fit</span></span><br><span class="line"><span class="string">                    // otherwise reduce maxLength to start of the encoded char</span></span><br><span class="line"><span class="string">                    if ($encodedCharPos &gt; 0) &#123;</span></span><br><span class="line"><span class="string">                        $maxLength -= $lookBack - $encodedCharPos;</span></span><br><span class="line"><span class="string">                    &#125;</span></span><br><span class="line"><span class="string">                    $foundSplitPos = true;</span></span><br><span class="line"><span class="string">                &#125; elseif ($dec &gt;= 192) &#123;</span></span><br><span class="line"><span class="string">                    // First byte of a multi byte character</span></span><br><span class="line"><span class="string">                    // Reduce maxLength to split at start of character</span></span><br><span class="line"><span class="string">                    $maxLength -= $lookBack - $encodedCharPos;</span></span><br><span class="line"><span class="string">                    $foundSplitPos = true;</span></span><br><span class="line"><span class="string">                &#125; elseif ($dec &lt; 192) &#123;</span></span><br><span class="line"><span class="string">                    // Middle byte of a multi byte character, look further back</span></span><br><span class="line"><span class="string">                    $lookBack += 3;</span></span><br><span class="line"><span class="string">                &#125;</span></span><br><span class="line"><span class="string">            &#125; else &#123;</span></span><br><span class="line"><span class="string">                // No encoded character found</span></span><br><span class="line"><span class="string">                $foundSplitPos = true;</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        return $maxLength;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Apply word wrapping to the message body.</span></span><br><span class="line"><span class="string">     * Wraps the message body to the number of chars set in the WordWrap property.</span></span><br><span class="line"><span class="string">     * You should only do this to plain-text bodies as wrapping HTML tags may break them.</span></span><br><span class="line"><span class="string">     * This is called automatically by createBody(), so you don&#x27;</span>t need to call it yourself.</span><br><span class="line">     */</span><br><span class="line">    public <span class="keyword">function</span> <span class="function"><span class="title">setWordWrap</span></span>()</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="keyword">if</span> (<span class="variable">$this</span>-&gt;WordWrap &lt; 1) &#123;</span><br><span class="line">            <span class="built_in">return</span>;</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        switch (<span class="variable">$this</span>-&gt;message_type) &#123;</span><br><span class="line">            <span class="keyword">case</span> <span class="string">&#x27;alt&#x27;</span>:</span><br><span class="line">            <span class="keyword">case</span> <span class="string">&#x27;alt_inline&#x27;</span>:</span><br><span class="line">            <span class="keyword">case</span> <span class="string">&#x27;alt_attach&#x27;</span>:</span><br><span class="line">            <span class="keyword">case</span> <span class="string">&#x27;alt_inline_attach&#x27;</span>:</span><br><span class="line">                <span class="variable">$this</span>-&gt;AltBody = <span class="variable">$this</span>-&gt;wrapText(<span class="variable">$this</span>-&gt;AltBody, <span class="variable">$this</span>-&gt;WordWrap);</span><br><span class="line">                <span class="built_in">break</span>;</span><br><span class="line">            default:</span><br><span class="line">                <span class="variable">$this</span>-&gt;Body = <span class="variable">$this</span>-&gt;wrapText(<span class="variable">$this</span>-&gt;Body, <span class="variable">$this</span>-&gt;WordWrap);</span><br><span class="line">                <span class="built_in">break</span>;</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Assemble message headers.</span><br><span class="line">     *</span><br><span class="line">     * @<span class="built_in">return</span> string The assembled headers</span><br><span class="line">     */</span><br><span class="line">    public <span class="keyword">function</span> <span class="function"><span class="title">createHeader</span></span>()</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="variable">$result</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line"></span><br><span class="line">        <span class="variable">$result</span> .= <span class="variable">$this</span>-&gt;headerLine(<span class="string">&#x27;Date&#x27;</span>, <span class="string">&#x27;&#x27;</span> === <span class="variable">$this</span>-&gt;MessageDate ? self::rfcDate() : <span class="variable">$this</span>-&gt;MessageDate);</span><br><span class="line"></span><br><span class="line">        // To be created automatically by mail()</span><br><span class="line">        <span class="keyword">if</span> (<span class="variable">$this</span>-&gt;SingleTo) &#123;</span><br><span class="line">            <span class="keyword">if</span> (<span class="string">&#x27;mail&#x27;</span> !== <span class="variable">$this</span>-&gt;Mailer) &#123;</span><br><span class="line">                foreach (<span class="variable">$this</span>-&gt;to as <span class="variable">$toaddr</span>) &#123;</span><br><span class="line">                    <span class="variable">$this</span>-&gt;SingleToArray[] = <span class="variable">$this</span>-&gt;addrFormat(<span class="variable">$toaddr</span>);</span><br><span class="line">                &#125;</span><br><span class="line">            &#125;</span><br><span class="line">        &#125; elseif (count(<span class="variable">$this</span>-&gt;to) &gt; 0) &#123;</span><br><span class="line">            <span class="keyword">if</span> (<span class="string">&#x27;mail&#x27;</span> !== <span class="variable">$this</span>-&gt;Mailer) &#123;</span><br><span class="line">                <span class="variable">$result</span> .= <span class="variable">$this</span>-&gt;addrAppend(<span class="string">&#x27;To&#x27;</span>, <span class="variable">$this</span>-&gt;to);</span><br><span class="line">            &#125;</span><br><span class="line">        &#125; elseif (count(<span class="variable">$this</span>-&gt;cc) === 0) &#123;</span><br><span class="line">            <span class="variable">$result</span> .= <span class="variable">$this</span>-&gt;headerLine(<span class="string">&#x27;To&#x27;</span>, <span class="string">&#x27;undisclosed-recipients:;&#x27;</span>);</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        <span class="variable">$result</span> .= <span class="variable">$this</span>-&gt;addrAppend(<span class="string">&#x27;From&#x27;</span>, [[trim(<span class="variable">$this</span>-&gt;From), <span class="variable">$this</span>-&gt;FromName]]);</span><br><span class="line"></span><br><span class="line">        // sendmail and mail() extract Cc from the header before sending</span><br><span class="line">        <span class="keyword">if</span> (count(<span class="variable">$this</span>-&gt;cc) &gt; 0) &#123;</span><br><span class="line">            <span class="variable">$result</span> .= <span class="variable">$this</span>-&gt;addrAppend(<span class="string">&#x27;Cc&#x27;</span>, <span class="variable">$this</span>-&gt;cc);</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        // sendmail and mail() extract Bcc from the header before sending</span><br><span class="line">        <span class="keyword">if</span> ((</span><br><span class="line">                &#x27;sendmail&#x27; === <span class="variable">$this</span>-&gt;Mailer || &#x27;qmail&#x27; === <span class="variable">$this</span>-&gt;Mailer || &#x27;mail&#x27; === <span class="variable">$this</span>-&gt;Mailer</span><br><span class="line">            )</span><br><span class="line">            &amp;&amp; count(<span class="variable">$this</span>-&gt;bcc) &gt; <span class="number">0</span></span><br><span class="line">        ) &#123;</span><br><span class="line">            <span class="variable">$result</span> .= <span class="variable">$this</span>-&gt;addrAppend(&#x27;Bcc&#x27;, <span class="variable">$this</span>-&gt;bcc);</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        if (count(<span class="variable">$this</span>-&gt;ReplyTo) &gt; <span class="number">0</span>) &#123;</span><br><span class="line">            <span class="variable">$result</span> .= <span class="variable">$this</span>-&gt;addrAppend(&#x27;Reply-To&#x27;, <span class="variable">$this</span>-&gt;ReplyTo);</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        // mail() sets the subject itself</span><br><span class="line">        if (&#x27;mail&#x27; !== <span class="variable">$this</span>-&gt;Mailer) &#123;</span><br><span class="line">            <span class="variable">$result</span> .= <span class="variable">$this</span>-&gt;headerLine(&#x27;Subject&#x27;, <span class="variable">$this</span>-&gt;encodeHeader(<span class="variable">$this</span>-&gt;secureHeader(<span class="variable">$this</span>-&gt;Subject)));</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        // Only allow a custom message ID <span class="keyword">if</span> it conforms to RFC 5322 section 3.6.4</span><br><span class="line">        // https://tools.ietf.org/html/rfc5322<span class="comment">#section-3.6.4</span></span><br><span class="line">        <span class="keyword">if</span> (<span class="string">&#x27;&#x27;</span> !== <span class="variable">$this</span>-&gt;MessageID &amp;&amp; preg_match(<span class="string">&#x27;/^&lt;.*@.*&gt;$/&#x27;</span>, <span class="variable">$this</span>-&gt;MessageID)) &#123;</span><br><span class="line">            <span class="variable">$this</span>-&gt;lastMessageID = <span class="variable">$this</span>-&gt;MessageID;</span><br><span class="line">        &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">            <span class="variable">$this</span>-&gt;lastMessageID = sprintf(<span class="string">&#x27;&lt;%s@%s&gt;&#x27;</span>, <span class="variable">$this</span>-&gt;uniqueid, <span class="variable">$this</span>-&gt;serverHostname());</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="variable">$result</span> .= <span class="variable">$this</span>-&gt;headerLine(<span class="string">&#x27;Message-ID&#x27;</span>, <span class="variable">$this</span>-&gt;lastMessageID);</span><br><span class="line">        <span class="keyword">if</span> (null !== <span class="variable">$this</span>-&gt;Priority) &#123;</span><br><span class="line">            <span class="variable">$result</span> .= <span class="variable">$this</span>-&gt;headerLine(<span class="string">&#x27;X-Priority&#x27;</span>, <span class="variable">$this</span>-&gt;Priority);</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="keyword">if</span> (<span class="string">&#x27;&#x27;</span> === <span class="variable">$this</span>-&gt;XMailer) &#123;</span><br><span class="line">            <span class="variable">$result</span> .= <span class="variable">$this</span>-&gt;headerLine(</span><br><span class="line">                <span class="string">&#x27;X-Mailer&#x27;</span>,</span><br><span class="line">                <span class="string">&#x27;PHPMailer &#x27;</span> . self::VERSION . <span class="string">&#x27; (https://github.com/PHPMailer/PHPMailer)&#x27;</span></span><br><span class="line">            );</span><br><span class="line">        &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">            <span class="variable">$myXmailer</span> = trim(<span class="variable">$this</span>-&gt;XMailer);</span><br><span class="line">            <span class="keyword">if</span> (<span class="variable">$myXmailer</span>) &#123;</span><br><span class="line">                <span class="variable">$result</span> .= <span class="variable">$this</span>-&gt;headerLine(<span class="string">&#x27;X-Mailer&#x27;</span>, <span class="variable">$myXmailer</span>);</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        <span class="keyword">if</span> (<span class="string">&#x27;&#x27;</span> !== <span class="variable">$this</span>-&gt;ConfirmReadingTo) &#123;</span><br><span class="line">            <span class="variable">$result</span> .= <span class="variable">$this</span>-&gt;headerLine(<span class="string">&#x27;Disposition-Notification-To&#x27;</span>, <span class="string">&#x27;&lt;&#x27;</span> . <span class="variable">$this</span>-&gt;ConfirmReadingTo . <span class="string">&#x27;&gt;&#x27;</span>);</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        // Add custom headers</span><br><span class="line">        foreach (<span class="variable">$this</span>-&gt;CustomHeader as <span class="variable">$header</span>) &#123;</span><br><span class="line">            <span class="variable">$result</span> .= <span class="variable">$this</span>-&gt;headerLine(</span><br><span class="line">                trim(<span class="variable">$header</span>[0]),</span><br><span class="line">                <span class="variable">$this</span>-&gt;encodeHeader(trim(<span class="variable">$header</span>[1]))</span><br><span class="line">            );</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="keyword">if</span> (!<span class="variable">$this</span>-&gt;sign_key_file) &#123;</span><br><span class="line">            <span class="variable">$result</span> .= <span class="variable">$this</span>-&gt;headerLine(<span class="string">&#x27;MIME-SystemVersion&#x27;</span>, <span class="string">&#x27;1.0&#x27;</span>);</span><br><span class="line">            <span class="variable">$result</span> .= <span class="variable">$this</span>-&gt;getMailMIME();</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        <span class="built_in">return</span> <span class="variable">$result</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Get the message MIME <span class="built_in">type</span> headers.</span><br><span class="line">     *</span><br><span class="line">     * @<span class="built_in">return</span> string</span><br><span class="line">     */</span><br><span class="line">    public <span class="keyword">function</span> <span class="function"><span class="title">getMailMIME</span></span>()</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="variable">$result</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">        <span class="variable">$ismultipart</span> = <span class="literal">true</span>;</span><br><span class="line">        switch (<span class="variable">$this</span>-&gt;message_type) &#123;</span><br><span class="line">            <span class="keyword">case</span> <span class="string">&#x27;inline&#x27;</span>:</span><br><span class="line">                <span class="variable">$result</span> .= <span class="variable">$this</span>-&gt;headerLine(<span class="string">&#x27;Content-Type&#x27;</span>, static::CONTENT_TYPE_MULTIPART_RELATED . <span class="string">&#x27;;&#x27;</span>);</span><br><span class="line">                <span class="variable">$result</span> .= <span class="variable">$this</span>-&gt;textLine(<span class="string">&#x27; boundary=&quot;&#x27;</span> . <span class="variable">$this</span>-&gt;boundary[1] . <span class="string">&#x27;&quot;&#x27;</span>);</span><br><span class="line">                <span class="built_in">break</span>;</span><br><span class="line">            <span class="keyword">case</span> <span class="string">&#x27;attach&#x27;</span>:</span><br><span class="line">            <span class="keyword">case</span> <span class="string">&#x27;inline_attach&#x27;</span>:</span><br><span class="line">            <span class="keyword">case</span> <span class="string">&#x27;alt_attach&#x27;</span>:</span><br><span class="line">            <span class="keyword">case</span> <span class="string">&#x27;alt_inline_attach&#x27;</span>:</span><br><span class="line">                <span class="variable">$result</span> .= <span class="variable">$this</span>-&gt;headerLine(<span class="string">&#x27;Content-Type&#x27;</span>, static::CONTENT_TYPE_MULTIPART_MIXED . <span class="string">&#x27;;&#x27;</span>);</span><br><span class="line">                <span class="variable">$result</span> .= <span class="variable">$this</span>-&gt;textLine(<span class="string">&#x27; boundary=&quot;&#x27;</span> . <span class="variable">$this</span>-&gt;boundary[1] . <span class="string">&#x27;&quot;&#x27;</span>);</span><br><span class="line">                <span class="built_in">break</span>;</span><br><span class="line">            <span class="keyword">case</span> <span class="string">&#x27;alt&#x27;</span>:</span><br><span class="line">            <span class="keyword">case</span> <span class="string">&#x27;alt_inline&#x27;</span>:</span><br><span class="line">                <span class="variable">$result</span> .= <span class="variable">$this</span>-&gt;headerLine(<span class="string">&#x27;Content-Type&#x27;</span>, static::CONTENT_TYPE_MULTIPART_ALTERNATIVE . <span class="string">&#x27;;&#x27;</span>);</span><br><span class="line">                <span class="variable">$result</span> .= <span class="variable">$this</span>-&gt;textLine(<span class="string">&#x27; boundary=&quot;&#x27;</span> . <span class="variable">$this</span>-&gt;boundary[1] . <span class="string">&#x27;&quot;&#x27;</span>);</span><br><span class="line">                <span class="built_in">break</span>;</span><br><span class="line">            default:</span><br><span class="line">                // Catches <span class="keyword">case</span> <span class="string">&#x27;plain&#x27;</span>: and <span class="keyword">case</span> <span class="string">&#x27;&#x27;</span>:</span><br><span class="line">                <span class="variable">$result</span> .= <span class="variable">$this</span>-&gt;textLine(<span class="string">&#x27;Content-Type: &#x27;</span> . <span class="variable">$this</span>-&gt;ContentType . <span class="string">&#x27;; charset=&#x27;</span> . <span class="variable">$this</span>-&gt;CharSet);</span><br><span class="line">                <span class="variable">$ismultipart</span> = <span class="literal">false</span>;</span><br><span class="line">                <span class="built_in">break</span>;</span><br><span class="line">        &#125;</span><br><span class="line">        // RFC1341 part 5 says 7bit is assumed <span class="keyword">if</span> not specified</span><br><span class="line">        <span class="keyword">if</span> (static::ENCODING_7BIT !== <span class="variable">$this</span>-&gt;Encoding) &#123;</span><br><span class="line">            // RFC 2045 section 6.4 says multipart MIME parts may only use 7bit, 8bit or binary CTE</span><br><span class="line">            <span class="keyword">if</span> (<span class="variable">$ismultipart</span>) &#123;</span><br><span class="line">                <span class="keyword">if</span> (static::ENCODING_8BIT === <span class="variable">$this</span>-&gt;Encoding) &#123;</span><br><span class="line">                    <span class="variable">$result</span> .= <span class="variable">$this</span>-&gt;headerLine(<span class="string">&#x27;Content-Transfer-Encoding&#x27;</span>, static::ENCODING_8BIT);</span><br><span class="line">                &#125;</span><br><span class="line">                // The only remaining alternatives are quoted-printable and <span class="built_in">base64</span>, <span class="built_in">which</span> are both 7bit compatible</span><br><span class="line">            &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">                <span class="variable">$result</span> .= <span class="variable">$this</span>-&gt;headerLine(<span class="string">&#x27;Content-Transfer-Encoding&#x27;</span>, <span class="variable">$this</span>-&gt;Encoding);</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        <span class="keyword">if</span> (<span class="string">&#x27;mail&#x27;</span> !== <span class="variable">$this</span>-&gt;Mailer) &#123;</span><br><span class="line">//            <span class="variable">$result</span> .= static::<span class="variable">$LE</span>;</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        <span class="built_in">return</span> <span class="variable">$result</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Returns the whole MIME message.</span><br><span class="line">     * Includes complete headers and body.</span><br><span class="line">     * Only valid post preSend().</span><br><span class="line">     *</span><br><span class="line">     * @see PHPMailer::preSend()</span><br><span class="line">     *</span><br><span class="line">     * @<span class="built_in">return</span> string</span><br><span class="line">     */</span><br><span class="line">    public <span class="keyword">function</span> <span class="function"><span class="title">getSentMIMEMessage</span></span>()</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="built_in">return</span> static::stripTrailingWSP(<span class="variable">$this</span>-&gt;MIMEHeader . <span class="variable">$this</span>-&gt;mailHeader) .</span><br><span class="line">            static::<span class="variable">$LE</span> . static::<span class="variable">$LE</span> . <span class="variable">$this</span>-&gt;MIMEBody;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Create a unique ID to use <span class="keyword">for</span> boundaries.</span><br><span class="line">     *</span><br><span class="line">     * @<span class="built_in">return</span> string</span><br><span class="line">     */</span><br><span class="line">    protected <span class="keyword">function</span> <span class="function"><span class="title">generateId</span></span>()</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="variable">$len</span> = 32; //32 bytes = 256 bits</span><br><span class="line">        <span class="variable">$bytes</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">        <span class="keyword">if</span> (function_exists(<span class="string">&#x27;random_bytes&#x27;</span>)) &#123;</span><br><span class="line">            try &#123;</span><br><span class="line">                <span class="variable">$bytes</span> = random_bytes(<span class="variable">$len</span>);</span><br><span class="line">            &#125; catch (\Exception <span class="variable">$e</span>) &#123;</span><br><span class="line">                //Do nothing</span><br><span class="line">            &#125;</span><br><span class="line">        &#125; elseif (function_exists(<span class="string">&#x27;openssl_random_pseudo_bytes&#x27;</span>)) &#123;</span><br><span class="line">            /** @noinspection CryptographicallySecureRandomnessInspection */</span><br><span class="line">            <span class="variable">$bytes</span> = openssl_random_pseudo_bytes(<span class="variable">$len</span>);</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="keyword">if</span> (<span class="variable">$bytes</span> === <span class="string">&#x27;&#x27;</span>) &#123;</span><br><span class="line">            //We failed to produce a proper random string, so make <span class="keyword">do</span>.</span><br><span class="line">            //Use a <span class="built_in">hash</span> to force the length to the same as the other methods</span><br><span class="line">            <span class="variable">$bytes</span> = <span class="built_in">hash</span>(<span class="string">&#x27;sha256&#x27;</span>, uniqid((string) mt_rand(), true), true);</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        //We don&#x27;t care about messing up base64 format here, just want a random string</span><br><span class="line">        return str_replace([&#x27;=&#x27;, &#x27;+&#x27;, &#x27;/&#x27;], &#x27;&#x27;, base64_encode(hash(&#x27;sha256&#x27;, <span class="variable">$bytes</span>, true)));</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Assemble the message body.</span><br><span class="line">     * Returns an empty string on failure.</span><br><span class="line">     *</span><br><span class="line">     * @throws Exception</span><br><span class="line">     *</span><br><span class="line">     * @<span class="built_in">return</span> string The assembled message body</span><br><span class="line">     */</span><br><span class="line">    public <span class="keyword">function</span> <span class="function"><span class="title">createBody</span></span>()</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="variable">$body</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">        //Create unique IDs and preset boundaries</span><br><span class="line">        <span class="variable">$this</span>-&gt;uniqueid = <span class="variable">$this</span>-&gt;generateId();</span><br><span class="line">        <span class="variable">$this</span>-&gt;boundary[1] = <span class="string">&#x27;b1_&#x27;</span> . <span class="variable">$this</span>-&gt;uniqueid;</span><br><span class="line">        <span class="variable">$this</span>-&gt;boundary[2] = <span class="string">&#x27;b2_&#x27;</span> . <span class="variable">$this</span>-&gt;uniqueid;</span><br><span class="line">        <span class="variable">$this</span>-&gt;boundary[3] = <span class="string">&#x27;b3_&#x27;</span> . <span class="variable">$this</span>-&gt;uniqueid;</span><br><span class="line"></span><br><span class="line">        <span class="keyword">if</span> (<span class="variable">$this</span>-&gt;sign_key_file) &#123;</span><br><span class="line">            <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;getMailMIME() . static::<span class="variable">$LE</span>;</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        <span class="variable">$this</span>-&gt;setWordWrap();</span><br><span class="line"></span><br><span class="line">        <span class="variable">$bodyEncoding</span> = <span class="variable">$this</span>-&gt;Encoding;</span><br><span class="line">        <span class="variable">$bodyCharSet</span> = <span class="variable">$this</span>-&gt;CharSet;</span><br><span class="line">        //Can we <span class="keyword">do</span> a 7-bit downgrade?</span><br><span class="line">        <span class="keyword">if</span> (static::ENCODING_8BIT === <span class="variable">$bodyEncoding</span> &amp;&amp; !<span class="variable">$this</span>-&gt;has8bitChars(<span class="variable">$this</span>-&gt;Body)) &#123;</span><br><span class="line">            <span class="variable">$bodyEncoding</span> = static::ENCODING_7BIT;</span><br><span class="line">            //All ISO 8859, Windows codepage and UTF-8 charsets are ascii compatible up to 7-bit</span><br><span class="line">            <span class="variable">$bodyCharSet</span> = static::CHARSET_ASCII;</span><br><span class="line">        &#125;</span><br><span class="line">        //If lines are too long, and we<span class="string">&#x27;re not already using an encoding that will shorten them,</span></span><br><span class="line"><span class="string">        //change to quoted-printable transfer encoding for the body part only</span></span><br><span class="line"><span class="string">        if (static::ENCODING_BASE64 !== $this-&gt;Encoding &amp;&amp; static::hasLineLongerThanMax($this-&gt;Body)) &#123;</span></span><br><span class="line"><span class="string">            $bodyEncoding = static::ENCODING_QUOTED_PRINTABLE;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        $altBodyEncoding = $this-&gt;Encoding;</span></span><br><span class="line"><span class="string">        $altBodyCharSet = $this-&gt;CharSet;</span></span><br><span class="line"><span class="string">        //Can we do a 7-bit downgrade?</span></span><br><span class="line"><span class="string">        if (static::ENCODING_8BIT === $altBodyEncoding &amp;&amp; !$this-&gt;has8bitChars($this-&gt;AltBody)) &#123;</span></span><br><span class="line"><span class="string">            $altBodyEncoding = static::ENCODING_7BIT;</span></span><br><span class="line"><span class="string">            //All ISO 8859, Windows codepage and UTF-8 charsets are ascii compatible up to 7-bit</span></span><br><span class="line"><span class="string">            $altBodyCharSet = static::CHARSET_ASCII;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        //If lines are too long, and we&#x27;</span>re not already using an encoding that will shorten them,</span><br><span class="line">        //change to quoted-printable transfer encoding <span class="keyword">for</span> the alt body part only</span><br><span class="line">        <span class="keyword">if</span> (static::ENCODING_BASE64 !== <span class="variable">$altBodyEncoding</span> &amp;&amp; static::hasLineLongerThanMax(<span class="variable">$this</span>-&gt;AltBody)) &#123;</span><br><span class="line">            <span class="variable">$altBodyEncoding</span> = static::ENCODING_QUOTED_PRINTABLE;</span><br><span class="line">        &#125;</span><br><span class="line">        //Use this as a preamble <span class="keyword">in</span> all multipart message types</span><br><span class="line">        <span class="variable">$mimepre</span> = <span class="string">&#x27;This is a multi-part message in MIME format.&#x27;</span> . static::<span class="variable">$LE</span>  . static::<span class="variable">$LE</span>;</span><br><span class="line">        switch (<span class="variable">$this</span>-&gt;message_type) &#123;</span><br><span class="line">            <span class="keyword">case</span> <span class="string">&#x27;inline&#x27;</span>:</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$mimepre</span>;</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;getBoundary(<span class="variable">$this</span>-&gt;boundary[1], <span class="variable">$bodyCharSet</span>, <span class="string">&#x27;&#x27;</span>, <span class="variable">$bodyEncoding</span>);</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;encodeString(<span class="variable">$this</span>-&gt;Body, <span class="variable">$bodyEncoding</span>);</span><br><span class="line">                <span class="variable">$body</span> .= static::<span class="variable">$LE</span>;</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;attachAll(<span class="string">&#x27;inline&#x27;</span>, <span class="variable">$this</span>-&gt;boundary[1]);</span><br><span class="line">                <span class="built_in">break</span>;</span><br><span class="line">            <span class="keyword">case</span> <span class="string">&#x27;attach&#x27;</span>:</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$mimepre</span>;</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;getBoundary(<span class="variable">$this</span>-&gt;boundary[1], <span class="variable">$bodyCharSet</span>, <span class="string">&#x27;&#x27;</span>, <span class="variable">$bodyEncoding</span>);</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;encodeString(<span class="variable">$this</span>-&gt;Body, <span class="variable">$bodyEncoding</span>);</span><br><span class="line">                <span class="variable">$body</span> .= static::<span class="variable">$LE</span>;</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;attachAll(<span class="string">&#x27;attachment&#x27;</span>, <span class="variable">$this</span>-&gt;boundary[1]);</span><br><span class="line">                <span class="built_in">break</span>;</span><br><span class="line">            <span class="keyword">case</span> <span class="string">&#x27;inline_attach&#x27;</span>:</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$mimepre</span>;</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;textLine(<span class="string">&#x27;--&#x27;</span> . <span class="variable">$this</span>-&gt;boundary[1]);</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;headerLine(<span class="string">&#x27;Content-Type&#x27;</span>, static::CONTENT_TYPE_MULTIPART_RELATED . <span class="string">&#x27;;&#x27;</span>);</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;textLine(<span class="string">&#x27; boundary=&quot;&#x27;</span> . <span class="variable">$this</span>-&gt;boundary[2] . <span class="string">&#x27;&quot;;&#x27;</span>);</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;textLine(<span class="string">&#x27; type=&quot;&#x27;</span> . static::CONTENT_TYPE_TEXT_HTML . <span class="string">&#x27;&quot;&#x27;</span>);</span><br><span class="line">                <span class="variable">$body</span> .= static::<span class="variable">$LE</span>;</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;getBoundary(<span class="variable">$this</span>-&gt;boundary[2], <span class="variable">$bodyCharSet</span>, <span class="string">&#x27;&#x27;</span>, <span class="variable">$bodyEncoding</span>);</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;encodeString(<span class="variable">$this</span>-&gt;Body, <span class="variable">$bodyEncoding</span>);</span><br><span class="line">                <span class="variable">$body</span> .= static::<span class="variable">$LE</span>;</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;attachAll(<span class="string">&#x27;inline&#x27;</span>, <span class="variable">$this</span>-&gt;boundary[2]);</span><br><span class="line">                <span class="variable">$body</span> .= static::<span class="variable">$LE</span>;</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;attachAll(<span class="string">&#x27;attachment&#x27;</span>, <span class="variable">$this</span>-&gt;boundary[1]);</span><br><span class="line">                <span class="built_in">break</span>;</span><br><span class="line">            <span class="keyword">case</span> <span class="string">&#x27;alt&#x27;</span>:</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$mimepre</span>;</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;getBoundary(</span><br><span class="line">                    <span class="variable">$this</span>-&gt;boundary[1],</span><br><span class="line">                    <span class="variable">$altBodyCharSet</span>,</span><br><span class="line">                    static::CONTENT_TYPE_PLAINTEXT,</span><br><span class="line">                    <span class="variable">$altBodyEncoding</span></span><br><span class="line">                );</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;encodeString(<span class="variable">$this</span>-&gt;AltBody, <span class="variable">$altBodyEncoding</span>);</span><br><span class="line">                <span class="variable">$body</span> .= static::<span class="variable">$LE</span>;</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;getBoundary(</span><br><span class="line">                    <span class="variable">$this</span>-&gt;boundary[1],</span><br><span class="line">                    <span class="variable">$bodyCharSet</span>,</span><br><span class="line">                    static::CONTENT_TYPE_TEXT_HTML,</span><br><span class="line">                    <span class="variable">$bodyEncoding</span></span><br><span class="line">                );</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;encodeString(<span class="variable">$this</span>-&gt;Body, <span class="variable">$bodyEncoding</span>);</span><br><span class="line">                <span class="variable">$body</span> .= static::<span class="variable">$LE</span>;</span><br><span class="line">                <span class="keyword">if</span> (!empty(<span class="variable">$this</span>-&gt;Ical)) &#123;</span><br><span class="line">                    <span class="variable">$method</span> = static::ICAL_METHOD_REQUEST;</span><br><span class="line">                    foreach (static::<span class="variable">$IcalMethods</span> as <span class="variable">$imethod</span>) &#123;</span><br><span class="line">                        <span class="keyword">if</span> (stripos(<span class="variable">$this</span>-&gt;Ical, <span class="string">&#x27;METHOD:&#x27;</span> . <span class="variable">$imethod</span>) !== <span class="literal">false</span>) &#123;</span><br><span class="line">                            <span class="variable">$method</span> = <span class="variable">$imethod</span>;</span><br><span class="line">                            <span class="built_in">break</span>;</span><br><span class="line">                        &#125;</span><br><span class="line">                    &#125;</span><br><span class="line">                    <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;getBoundary(</span><br><span class="line">                        <span class="variable">$this</span>-&gt;boundary[1],</span><br><span class="line">                        <span class="string">&#x27;&#x27;</span>,</span><br><span class="line">                        static::CONTENT_TYPE_TEXT_CALENDAR . <span class="string">&#x27;; method=&#x27;</span> . <span class="variable">$method</span>,</span><br><span class="line">                        <span class="string">&#x27;&#x27;</span></span><br><span class="line">                    );</span><br><span class="line">                    <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;encodeString(<span class="variable">$this</span>-&gt;Ical, <span class="variable">$this</span>-&gt;Encoding);</span><br><span class="line">                    <span class="variable">$body</span> .= static::<span class="variable">$LE</span>;</span><br><span class="line">                &#125;</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;endBoundary(<span class="variable">$this</span>-&gt;boundary[1]);</span><br><span class="line">                <span class="built_in">break</span>;</span><br><span class="line">            <span class="keyword">case</span> <span class="string">&#x27;alt_inline&#x27;</span>:</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$mimepre</span>;</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;getBoundary(</span><br><span class="line">                    <span class="variable">$this</span>-&gt;boundary[1],</span><br><span class="line">                    <span class="variable">$altBodyCharSet</span>,</span><br><span class="line">                    static::CONTENT_TYPE_PLAINTEXT,</span><br><span class="line">                    <span class="variable">$altBodyEncoding</span></span><br><span class="line">                );</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;encodeString(<span class="variable">$this</span>-&gt;AltBody, <span class="variable">$altBodyEncoding</span>);</span><br><span class="line">                <span class="variable">$body</span> .= static::<span class="variable">$LE</span>;</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;textLine(<span class="string">&#x27;--&#x27;</span> . <span class="variable">$this</span>-&gt;boundary[1]);</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;headerLine(<span class="string">&#x27;Content-Type&#x27;</span>, static::CONTENT_TYPE_MULTIPART_RELATED . <span class="string">&#x27;;&#x27;</span>);</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;textLine(<span class="string">&#x27; boundary=&quot;&#x27;</span> . <span class="variable">$this</span>-&gt;boundary[2] . <span class="string">&#x27;&quot;;&#x27;</span>);</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;textLine(<span class="string">&#x27; type=&quot;&#x27;</span> . static::CONTENT_TYPE_TEXT_HTML . <span class="string">&#x27;&quot;&#x27;</span>);</span><br><span class="line">                <span class="variable">$body</span> .= static::<span class="variable">$LE</span>;</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;getBoundary(</span><br><span class="line">                    <span class="variable">$this</span>-&gt;boundary[2],</span><br><span class="line">                    <span class="variable">$bodyCharSet</span>,</span><br><span class="line">                    static::CONTENT_TYPE_TEXT_HTML,</span><br><span class="line">                    <span class="variable">$bodyEncoding</span></span><br><span class="line">                );</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;encodeString(<span class="variable">$this</span>-&gt;Body, <span class="variable">$bodyEncoding</span>);</span><br><span class="line">                <span class="variable">$body</span> .= static::<span class="variable">$LE</span>;</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;attachAll(<span class="string">&#x27;inline&#x27;</span>, <span class="variable">$this</span>-&gt;boundary[2]);</span><br><span class="line">                <span class="variable">$body</span> .= static::<span class="variable">$LE</span>;</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;endBoundary(<span class="variable">$this</span>-&gt;boundary[1]);</span><br><span class="line">                <span class="built_in">break</span>;</span><br><span class="line">            <span class="keyword">case</span> <span class="string">&#x27;alt_attach&#x27;</span>:</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$mimepre</span>;</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;textLine(<span class="string">&#x27;--&#x27;</span> . <span class="variable">$this</span>-&gt;boundary[1]);</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;headerLine(<span class="string">&#x27;Content-Type&#x27;</span>, static::CONTENT_TYPE_MULTIPART_ALTERNATIVE . <span class="string">&#x27;;&#x27;</span>);</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;textLine(<span class="string">&#x27; boundary=&quot;&#x27;</span> . <span class="variable">$this</span>-&gt;boundary[2] . <span class="string">&#x27;&quot;&#x27;</span>);</span><br><span class="line">                <span class="variable">$body</span> .= static::<span class="variable">$LE</span>;</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;getBoundary(</span><br><span class="line">                    <span class="variable">$this</span>-&gt;boundary[2],</span><br><span class="line">                    <span class="variable">$altBodyCharSet</span>,</span><br><span class="line">                    static::CONTENT_TYPE_PLAINTEXT,</span><br><span class="line">                    <span class="variable">$altBodyEncoding</span></span><br><span class="line">                );</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;encodeString(<span class="variable">$this</span>-&gt;AltBody, <span class="variable">$altBodyEncoding</span>);</span><br><span class="line">                <span class="variable">$body</span> .= static::<span class="variable">$LE</span>;</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;getBoundary(</span><br><span class="line">                    <span class="variable">$this</span>-&gt;boundary[2],</span><br><span class="line">                    <span class="variable">$bodyCharSet</span>,</span><br><span class="line">                    static::CONTENT_TYPE_TEXT_HTML,</span><br><span class="line">                    <span class="variable">$bodyEncoding</span></span><br><span class="line">                );</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;encodeString(<span class="variable">$this</span>-&gt;Body, <span class="variable">$bodyEncoding</span>);</span><br><span class="line">                <span class="variable">$body</span> .= static::<span class="variable">$LE</span>;</span><br><span class="line">                <span class="keyword">if</span> (!empty(<span class="variable">$this</span>-&gt;Ical)) &#123;</span><br><span class="line">                    <span class="variable">$method</span> = static::ICAL_METHOD_REQUEST;</span><br><span class="line">                    foreach (static::<span class="variable">$IcalMethods</span> as <span class="variable">$imethod</span>) &#123;</span><br><span class="line">                        <span class="keyword">if</span> (stripos(<span class="variable">$this</span>-&gt;Ical, <span class="string">&#x27;METHOD:&#x27;</span> . <span class="variable">$imethod</span>) !== <span class="literal">false</span>) &#123;</span><br><span class="line">                            <span class="variable">$method</span> = <span class="variable">$imethod</span>;</span><br><span class="line">                            <span class="built_in">break</span>;</span><br><span class="line">                        &#125;</span><br><span class="line">                    &#125;</span><br><span class="line">                    <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;getBoundary(</span><br><span class="line">                        <span class="variable">$this</span>-&gt;boundary[2],</span><br><span class="line">                        <span class="string">&#x27;&#x27;</span>,</span><br><span class="line">                        static::CONTENT_TYPE_TEXT_CALENDAR . <span class="string">&#x27;; method=&#x27;</span> . <span class="variable">$method</span>,</span><br><span class="line">                        <span class="string">&#x27;&#x27;</span></span><br><span class="line">                    );</span><br><span class="line">                    <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;encodeString(<span class="variable">$this</span>-&gt;Ical, <span class="variable">$this</span>-&gt;Encoding);</span><br><span class="line">                &#125;</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;endBoundary(<span class="variable">$this</span>-&gt;boundary[2]);</span><br><span class="line">                <span class="variable">$body</span> .= static::<span class="variable">$LE</span>;</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;attachAll(<span class="string">&#x27;attachment&#x27;</span>, <span class="variable">$this</span>-&gt;boundary[1]);</span><br><span class="line">                <span class="built_in">break</span>;</span><br><span class="line">            <span class="keyword">case</span> <span class="string">&#x27;alt_inline_attach&#x27;</span>:</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$mimepre</span>;</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;textLine(<span class="string">&#x27;--&#x27;</span> . <span class="variable">$this</span>-&gt;boundary[1]);</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;headerLine(<span class="string">&#x27;Content-Type&#x27;</span>, static::CONTENT_TYPE_MULTIPART_ALTERNATIVE . <span class="string">&#x27;;&#x27;</span>);</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;textLine(<span class="string">&#x27; boundary=&quot;&#x27;</span> . <span class="variable">$this</span>-&gt;boundary[2] . <span class="string">&#x27;&quot;&#x27;</span>);</span><br><span class="line">                <span class="variable">$body</span> .= static::<span class="variable">$LE</span>;</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;getBoundary(</span><br><span class="line">                    <span class="variable">$this</span>-&gt;boundary[2],</span><br><span class="line">                    <span class="variable">$altBodyCharSet</span>,</span><br><span class="line">                    static::CONTENT_TYPE_PLAINTEXT,</span><br><span class="line">                    <span class="variable">$altBodyEncoding</span></span><br><span class="line">                );</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;encodeString(<span class="variable">$this</span>-&gt;AltBody, <span class="variable">$altBodyEncoding</span>);</span><br><span class="line">                <span class="variable">$body</span> .= static::<span class="variable">$LE</span>;</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;textLine(<span class="string">&#x27;--&#x27;</span> . <span class="variable">$this</span>-&gt;boundary[2]);</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;headerLine(<span class="string">&#x27;Content-Type&#x27;</span>, static::CONTENT_TYPE_MULTIPART_RELATED . <span class="string">&#x27;;&#x27;</span>);</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;textLine(<span class="string">&#x27; boundary=&quot;&#x27;</span> . <span class="variable">$this</span>-&gt;boundary[3] . <span class="string">&#x27;&quot;;&#x27;</span>);</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;textLine(<span class="string">&#x27; type=&quot;&#x27;</span> . static::CONTENT_TYPE_TEXT_HTML . <span class="string">&#x27;&quot;&#x27;</span>);</span><br><span class="line">                <span class="variable">$body</span> .= static::<span class="variable">$LE</span>;</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;getBoundary(</span><br><span class="line">                    <span class="variable">$this</span>-&gt;boundary[3],</span><br><span class="line">                    <span class="variable">$bodyCharSet</span>,</span><br><span class="line">                    static::CONTENT_TYPE_TEXT_HTML,</span><br><span class="line">                    <span class="variable">$bodyEncoding</span></span><br><span class="line">                );</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;encodeString(<span class="variable">$this</span>-&gt;Body, <span class="variable">$bodyEncoding</span>);</span><br><span class="line">                <span class="variable">$body</span> .= static::<span class="variable">$LE</span>;</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;attachAll(<span class="string">&#x27;inline&#x27;</span>, <span class="variable">$this</span>-&gt;boundary[3]);</span><br><span class="line">                <span class="variable">$body</span> .= static::<span class="variable">$LE</span>;</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;endBoundary(<span class="variable">$this</span>-&gt;boundary[2]);</span><br><span class="line">                <span class="variable">$body</span> .= static::<span class="variable">$LE</span>;</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;attachAll(<span class="string">&#x27;attachment&#x27;</span>, <span class="variable">$this</span>-&gt;boundary[1]);</span><br><span class="line">                <span class="built_in">break</span>;</span><br><span class="line">            default:</span><br><span class="line">                // Catch <span class="keyword">case</span> <span class="string">&#x27;plain&#x27;</span> and <span class="keyword">case</span> <span class="string">&#x27;&#x27;</span>, applies to simple `text/plain` and `text/html` body content types</span><br><span class="line">                //Reset the `Encoding` property <span class="keyword">in</span> <span class="keyword">case</span> we changed it <span class="keyword">for</span> line length reasons</span><br><span class="line">                <span class="variable">$this</span>-&gt;Encoding = <span class="variable">$bodyEncoding</span>;</span><br><span class="line">                <span class="variable">$body</span> .= <span class="variable">$this</span>-&gt;encodeString(<span class="variable">$this</span>-&gt;Body, <span class="variable">$this</span>-&gt;Encoding);</span><br><span class="line">                <span class="built_in">break</span>;</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        <span class="keyword">if</span> (<span class="variable">$this</span>-&gt;isError()) &#123;</span><br><span class="line">            <span class="variable">$body</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">            <span class="keyword">if</span> (<span class="variable">$this</span>-&gt;exceptions) &#123;</span><br><span class="line">                throw new Exception(<span class="variable">$this</span>-&gt;lang(<span class="string">&#x27;empty_message&#x27;</span>), self::STOP_CRITICAL);</span><br><span class="line">            &#125;</span><br><span class="line">        &#125; elseif (<span class="variable">$this</span>-&gt;sign_key_file) &#123;</span><br><span class="line">            try &#123;</span><br><span class="line">                <span class="keyword">if</span> (!defined(<span class="string">&#x27;PKCS7_TEXT&#x27;</span>)) &#123;</span><br><span class="line">                    throw new Exception(<span class="variable">$this</span>-&gt;lang(<span class="string">&#x27;extension_missing&#x27;</span>) . <span class="string">&#x27;openssl&#x27;</span>);</span><br><span class="line">                &#125;</span><br><span class="line"></span><br><span class="line">                <span class="variable">$file</span> = tempnam(sys_get_temp_dir(), <span class="string">&#x27;srcsign&#x27;</span>);</span><br><span class="line">                <span class="variable">$signed</span> = tempnam(sys_get_temp_dir(), <span class="string">&#x27;mailsign&#x27;</span>);</span><br><span class="line">                file_put_contents(<span class="variable">$file</span>, <span class="variable">$body</span>);</span><br><span class="line"></span><br><span class="line">                //Workaround <span class="keyword">for</span> PHP bug https://bugs.php.net/bug.php?<span class="built_in">id</span>=69197</span><br><span class="line">                <span class="keyword">if</span> (empty(<span class="variable">$this</span>-&gt;sign_extracerts_file)) &#123;</span><br><span class="line">                    <span class="variable">$sign</span> = @openssl_pkcs7_sign(</span><br><span class="line">                        <span class="variable">$file</span>,</span><br><span class="line">                        <span class="variable">$signed</span>,</span><br><span class="line">                        <span class="string">&#x27;file://&#x27;</span> . <span class="built_in">realpath</span>(<span class="variable">$this</span>-&gt;sign_cert_file),</span><br><span class="line">                        [<span class="string">&#x27;file://&#x27;</span> . <span class="built_in">realpath</span>(<span class="variable">$this</span>-&gt;sign_key_file), <span class="variable">$this</span>-&gt;sign_key_pass],</span><br><span class="line">                        []</span><br><span class="line">                    );</span><br><span class="line">                &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">                    <span class="variable">$sign</span> = @openssl_pkcs7_sign(</span><br><span class="line">                        <span class="variable">$file</span>,</span><br><span class="line">                        <span class="variable">$signed</span>,</span><br><span class="line">                        <span class="string">&#x27;file://&#x27;</span> . <span class="built_in">realpath</span>(<span class="variable">$this</span>-&gt;sign_cert_file),</span><br><span class="line">                        [<span class="string">&#x27;file://&#x27;</span> . <span class="built_in">realpath</span>(<span class="variable">$this</span>-&gt;sign_key_file), <span class="variable">$this</span>-&gt;sign_key_pass],</span><br><span class="line">                        [],</span><br><span class="line">                        PKCS7_DETACHED,</span><br><span class="line">                        <span class="variable">$this</span>-&gt;sign_extracerts_file</span><br><span class="line">                    );</span><br><span class="line">                &#125;</span><br><span class="line"></span><br><span class="line">                @<span class="built_in">unlink</span>(<span class="variable">$file</span>);</span><br><span class="line">                <span class="keyword">if</span> (<span class="variable">$sign</span>) &#123;</span><br><span class="line">                    <span class="variable">$body</span> = file_get_contents(<span class="variable">$signed</span>);</span><br><span class="line">                    @<span class="built_in">unlink</span>(<span class="variable">$signed</span>);</span><br><span class="line">                    //The message returned by openssl contains both headers and body, so need to <span class="built_in">split</span> them up</span><br><span class="line">                    <span class="variable">$parts</span> = explode(<span class="string">&quot;\n\n&quot;</span>, <span class="variable">$body</span>, 2);</span><br><span class="line">                    <span class="variable">$this</span>-&gt;MIMEHeader .= <span class="variable">$parts</span>[0] . static::<span class="variable">$LE</span> . static::<span class="variable">$LE</span>;</span><br><span class="line">                    <span class="variable">$body</span> = <span class="variable">$parts</span>[1];</span><br><span class="line">                &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">                    @<span class="built_in">unlink</span>(<span class="variable">$signed</span>);</span><br><span class="line">                    throw new Exception(<span class="variable">$this</span>-&gt;lang(<span class="string">&#x27;signing&#x27;</span>) . openssl_error_string());</span><br><span class="line">                &#125;</span><br><span class="line">            &#125; catch (Exception <span class="variable">$exc</span>) &#123;</span><br><span class="line">                <span class="variable">$body</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">                <span class="keyword">if</span> (<span class="variable">$this</span>-&gt;exceptions) &#123;</span><br><span class="line">                    throw <span class="variable">$exc</span>;</span><br><span class="line">                &#125;</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        <span class="built_in">return</span> <span class="variable">$body</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Return the start of a message boundary.</span><br><span class="line">     *</span><br><span class="line">     * @param string <span class="variable">$boundary</span></span><br><span class="line">     * @param string <span class="variable">$charSet</span></span><br><span class="line">     * @param string <span class="variable">$contentType</span></span><br><span class="line">     * @param string <span class="variable">$encoding</span></span><br><span class="line">     *</span><br><span class="line">     * @<span class="built_in">return</span> string</span><br><span class="line">     */</span><br><span class="line">    protected <span class="keyword">function</span> getBoundary(<span class="variable">$boundary</span>, <span class="variable">$charSet</span>, <span class="variable">$contentType</span>, <span class="variable">$encoding</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="variable">$result</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">        <span class="keyword">if</span> (<span class="string">&#x27;&#x27;</span> === <span class="variable">$charSet</span>) &#123;</span><br><span class="line">            <span class="variable">$charSet</span> = <span class="variable">$this</span>-&gt;CharSet;</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="keyword">if</span> (<span class="string">&#x27;&#x27;</span> === <span class="variable">$contentType</span>) &#123;</span><br><span class="line">            <span class="variable">$contentType</span> = <span class="variable">$this</span>-&gt;ContentType;</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="keyword">if</span> (<span class="string">&#x27;&#x27;</span> === <span class="variable">$encoding</span>) &#123;</span><br><span class="line">            <span class="variable">$encoding</span> = <span class="variable">$this</span>-&gt;Encoding;</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="variable">$result</span> .= <span class="variable">$this</span>-&gt;textLine(<span class="string">&#x27;--&#x27;</span> . <span class="variable">$boundary</span>);</span><br><span class="line">        <span class="variable">$result</span> .= sprintf(<span class="string">&#x27;Content-Type: %s; charset=%s&#x27;</span>, <span class="variable">$contentType</span>, <span class="variable">$charSet</span>);</span><br><span class="line">        <span class="variable">$result</span> .= static::<span class="variable">$LE</span>;</span><br><span class="line">        // RFC1341 part 5 says 7bit is assumed <span class="keyword">if</span> not specified</span><br><span class="line">        <span class="keyword">if</span> (static::ENCODING_7BIT !== <span class="variable">$encoding</span>) &#123;</span><br><span class="line">            <span class="variable">$result</span> .= <span class="variable">$this</span>-&gt;headerLine(<span class="string">&#x27;Content-Transfer-Encoding&#x27;</span>, <span class="variable">$encoding</span>);</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="variable">$result</span> .= static::<span class="variable">$LE</span>;</span><br><span class="line"></span><br><span class="line">        <span class="built_in">return</span> <span class="variable">$result</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Return the end of a message boundary.</span><br><span class="line">     *</span><br><span class="line">     * @param string <span class="variable">$boundary</span></span><br><span class="line">     *</span><br><span class="line">     * @<span class="built_in">return</span> string</span><br><span class="line">     */</span><br><span class="line">    protected <span class="keyword">function</span> endBoundary(<span class="variable">$boundary</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="built_in">return</span> static::<span class="variable">$LE</span> . <span class="string">&#x27;--&#x27;</span> . <span class="variable">$boundary</span> . <span class="string">&#x27;--&#x27;</span> . static::<span class="variable">$LE</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Set the message <span class="built_in">type</span>.</span><br><span class="line">     * PHPMailer only supports some preset message types, not arbitrary MIME structures.</span><br><span class="line">     */</span><br><span class="line">    protected <span class="keyword">function</span> <span class="function"><span class="title">setMessageType</span></span>()</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="variable">$type</span> = [];</span><br><span class="line">        <span class="keyword">if</span> (<span class="variable">$this</span>-&gt;alternativeExists()) &#123;</span><br><span class="line">            <span class="variable">$type</span>[] = <span class="string">&#x27;alt&#x27;</span>;</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="keyword">if</span> (<span class="variable">$this</span>-&gt;inlineImageExists()) &#123;</span><br><span class="line">            <span class="variable">$type</span>[] = <span class="string">&#x27;inline&#x27;</span>;</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="keyword">if</span> (<span class="variable">$this</span>-&gt;attachmentExists()) &#123;</span><br><span class="line">            <span class="variable">$type</span>[] = <span class="string">&#x27;attach&#x27;</span>;</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="variable">$this</span>-&gt;message_type = implode(<span class="string">&#x27;_&#x27;</span>, <span class="variable">$type</span>);</span><br><span class="line">        <span class="keyword">if</span> (<span class="string">&#x27;&#x27;</span> === <span class="variable">$this</span>-&gt;message_type) &#123;</span><br><span class="line">            //The <span class="string">&#x27;plain&#x27;</span> message_type refers to the message having a single body element, not that it is plain-text</span><br><span class="line">            <span class="variable">$this</span>-&gt;message_type = <span class="string">&#x27;plain&#x27;</span>;</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Format a header line.</span><br><span class="line">     *</span><br><span class="line">     * @param string     <span class="variable">$name</span></span><br><span class="line">     * @param string|int <span class="variable">$value</span></span><br><span class="line">     *</span><br><span class="line">     * @<span class="built_in">return</span> string</span><br><span class="line">     */</span><br><span class="line">    public <span class="keyword">function</span> headerLine(<span class="variable">$name</span>, <span class="variable">$value</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="built_in">return</span> <span class="variable">$name</span> . <span class="string">&#x27;: &#x27;</span> . <span class="variable">$value</span> . static::<span class="variable">$LE</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Return a formatted mail line.</span><br><span class="line">     *</span><br><span class="line">     * @param string <span class="variable">$value</span></span><br><span class="line">     *</span><br><span class="line">     * @<span class="built_in">return</span> string</span><br><span class="line">     */</span><br><span class="line">    public <span class="keyword">function</span> textLine(<span class="variable">$value</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="built_in">return</span> <span class="variable">$value</span> . static::<span class="variable">$LE</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Add an attachment from a path on the filesystem.</span><br><span class="line">     * Never use a user-supplied path to a file!</span><br><span class="line">     * Returns <span class="literal">false</span> <span class="keyword">if</span> the file could not be found or <span class="built_in">read</span>.</span><br><span class="line">     * Explicitly *does not* support passing URLs; PHPMailer is not an HTTP client.</span><br><span class="line">     * If you need to <span class="keyword">do</span> that, fetch the resource yourself and pass it <span class="keyword">in</span> via a <span class="built_in">local</span> file or string.</span><br><span class="line">     *</span><br><span class="line">     * @param string <span class="variable">$path</span>        Path to the attachment</span><br><span class="line">     * @param string <span class="variable">$name</span>        Overrides the attachment name</span><br><span class="line">     * @param string <span class="variable">$encoding</span>    File encoding (see <span class="variable">$Encoding</span>)</span><br><span class="line">     * @param string <span class="variable">$type</span>        File extension (MIME) <span class="built_in">type</span></span><br><span class="line">     * @param string <span class="variable">$disposition</span> Disposition to use</span><br><span class="line">     *</span><br><span class="line">     * @throws Exception</span><br><span class="line">     *</span><br><span class="line">     * @<span class="built_in">return</span> bool</span><br><span class="line">     */</span><br><span class="line">    public <span class="keyword">function</span> addAttachment(</span><br><span class="line">        <span class="variable">$path</span>,</span><br><span class="line">        <span class="variable">$name</span> = <span class="string">&#x27;&#x27;</span>,</span><br><span class="line">        <span class="variable">$encoding</span> = self::ENCODING_BASE64,</span><br><span class="line">        <span class="variable">$type</span> = <span class="string">&#x27;&#x27;</span>,</span><br><span class="line">        <span class="variable">$disposition</span> = <span class="string">&#x27;attachment&#x27;</span></span><br><span class="line">    ) &#123;</span><br><span class="line">        try &#123;</span><br><span class="line">            <span class="keyword">if</span> (!static::isPermittedPath(<span class="variable">$path</span>) || !@is_file(<span class="variable">$path</span>) || !is_readable(<span class="variable">$path</span>)) &#123;</span><br><span class="line">                throw new Exception(<span class="variable">$this</span>-&gt;lang(<span class="string">&#x27;file_access&#x27;</span>) . <span class="variable">$path</span>, self::STOP_CONTINUE);</span><br><span class="line">            &#125;</span><br><span class="line"></span><br><span class="line">            // If a MIME <span class="built_in">type</span> is not specified, try to work it out from the file name</span><br><span class="line">            <span class="keyword">if</span> (<span class="string">&#x27;&#x27;</span> === <span class="variable">$type</span>) &#123;</span><br><span class="line">                <span class="variable">$type</span> = static::filenameToType(<span class="variable">$path</span>);</span><br><span class="line">            &#125;</span><br><span class="line"></span><br><span class="line">            <span class="variable">$filename</span> = (string) static::mb_pathinfo(<span class="variable">$path</span>, PATHINFO_BASENAME);</span><br><span class="line">            <span class="keyword">if</span> (<span class="string">&#x27;&#x27;</span> === <span class="variable">$name</span>) &#123;</span><br><span class="line">                <span class="variable">$name</span> = <span class="variable">$filename</span>;</span><br><span class="line">            &#125;</span><br><span class="line"></span><br><span class="line">            <span class="keyword">if</span> (!<span class="variable">$this</span>-&gt;validateEncoding(<span class="variable">$encoding</span>)) &#123;</span><br><span class="line">                throw new Exception(<span class="variable">$this</span>-&gt;lang(<span class="string">&#x27;encoding&#x27;</span>) . <span class="variable">$encoding</span>);</span><br><span class="line">            &#125;</span><br><span class="line"></span><br><span class="line">            <span class="variable">$this</span>-&gt;attachment[] = [</span><br><span class="line">                0 =&gt; <span class="variable">$path</span>,</span><br><span class="line">                1 =&gt; <span class="variable">$filename</span>,</span><br><span class="line">                2 =&gt; <span class="variable">$name</span>,</span><br><span class="line">                3 =&gt; <span class="variable">$encoding</span>,</span><br><span class="line">                4 =&gt; <span class="variable">$type</span>,</span><br><span class="line">                5 =&gt; <span class="literal">false</span>, // isStringAttachment</span><br><span class="line">                6 =&gt; <span class="variable">$disposition</span>,</span><br><span class="line">                7 =&gt; <span class="variable">$name</span>,</span><br><span class="line">            ];</span><br><span class="line">        &#125; catch (Exception <span class="variable">$exc</span>) &#123;</span><br><span class="line">            <span class="variable">$this</span>-&gt;setError(<span class="variable">$exc</span>-&gt;getMessage());</span><br><span class="line">            <span class="variable">$this</span>-&gt;edebug(<span class="variable">$exc</span>-&gt;getMessage());</span><br><span class="line">            <span class="keyword">if</span> (<span class="variable">$this</span>-&gt;exceptions) &#123;</span><br><span class="line">                throw <span class="variable">$exc</span>;</span><br><span class="line">            &#125;</span><br><span class="line"></span><br><span class="line">            <span class="built_in">return</span> <span class="literal">false</span>;</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        <span class="built_in">return</span> <span class="literal">true</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Return the array of attachments.</span><br><span class="line">     *</span><br><span class="line">     * @<span class="built_in">return</span> array</span><br><span class="line">     */</span><br><span class="line">    public <span class="keyword">function</span> <span class="function"><span class="title">getAttachments</span></span>()</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="built_in">return</span> <span class="variable">$this</span>-&gt;attachment;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Attach all file, string, and binary attachments to the message.</span><br><span class="line">     * Returns an empty string on failure.</span><br><span class="line">     *</span><br><span class="line">     * @param string <span class="variable">$disposition_type</span></span><br><span class="line">     * @param string <span class="variable">$boundary</span></span><br><span class="line">     *</span><br><span class="line">     * @throws Exception</span><br><span class="line">     *</span><br><span class="line">     * @<span class="built_in">return</span> string</span><br><span class="line">     */</span><br><span class="line">    protected <span class="keyword">function</span> attachAll(<span class="variable">$disposition_type</span>, <span class="variable">$boundary</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        // Return text of body</span><br><span class="line">        <span class="variable">$mime</span> = [];</span><br><span class="line">        <span class="variable">$cidUniq</span> = [];</span><br><span class="line">        <span class="variable">$incl</span> = [];</span><br><span class="line"></span><br><span class="line">        // Add all attachments</span><br><span class="line">        foreach (<span class="variable">$this</span>-&gt;attachment as <span class="variable">$attachment</span>) &#123;</span><br><span class="line">            // Check <span class="keyword">if</span> it is a valid disposition_filter</span><br><span class="line">            <span class="keyword">if</span> (<span class="variable">$attachment</span>[6] === <span class="variable">$disposition_type</span>) &#123;</span><br><span class="line">                // Check <span class="keyword">for</span> string attachment</span><br><span class="line">                <span class="variable">$string</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">                <span class="variable">$path</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">                <span class="variable">$bString</span> = <span class="variable">$attachment</span>[5];</span><br><span class="line">                <span class="keyword">if</span> (<span class="variable">$bString</span>) &#123;</span><br><span class="line">                    <span class="variable">$string</span> = <span class="variable">$attachment</span>[0];</span><br><span class="line">                &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">                    <span class="variable">$path</span> = <span class="variable">$attachment</span>[0];</span><br><span class="line">                &#125;</span><br><span class="line"></span><br><span class="line">                <span class="variable">$inclhash</span> = <span class="built_in">hash</span>(<span class="string">&#x27;sha256&#x27;</span>, serialize(<span class="variable">$attachment</span>));</span><br><span class="line">                <span class="keyword">if</span> (in_array(<span class="variable">$inclhash</span>, <span class="variable">$incl</span>, <span class="literal">true</span>)) &#123;</span><br><span class="line">                    <span class="built_in">continue</span>;</span><br><span class="line">                &#125;</span><br><span class="line">                <span class="variable">$incl</span>[] = <span class="variable">$inclhash</span>;</span><br><span class="line">                <span class="variable">$name</span> = <span class="variable">$attachment</span>[2];</span><br><span class="line">                <span class="variable">$encoding</span> = <span class="variable">$attachment</span>[3];</span><br><span class="line">                <span class="variable">$type</span> = <span class="variable">$attachment</span>[4];</span><br><span class="line">                <span class="variable">$disposition</span> = <span class="variable">$attachment</span>[6];</span><br><span class="line">                <span class="variable">$cid</span> = <span class="variable">$attachment</span>[7];</span><br><span class="line">                <span class="keyword">if</span> (<span class="string">&#x27;inline&#x27;</span> === <span class="variable">$disposition</span> &amp;&amp; array_key_exists(<span class="variable">$cid</span>, <span class="variable">$cidUniq</span>)) &#123;</span><br><span class="line">                    <span class="built_in">continue</span>;</span><br><span class="line">                &#125;</span><br><span class="line">                <span class="variable">$cidUniq</span>[<span class="variable">$cid</span>] = <span class="literal">true</span>;</span><br><span class="line"></span><br><span class="line">                <span class="variable">$mime</span>[] = sprintf(<span class="string">&#x27;--%s%s&#x27;</span>, <span class="variable">$boundary</span>, static::<span class="variable">$LE</span>);</span><br><span class="line">                //Only include a filename property <span class="keyword">if</span> we have one</span><br><span class="line">                <span class="keyword">if</span> (!empty(<span class="variable">$name</span>)) &#123;</span><br><span class="line">                    <span class="variable">$mime</span>[] = sprintf(</span><br><span class="line">                        <span class="string">&#x27;Content-Type: %s; name=&quot;%s&quot;%s&#x27;</span>,</span><br><span class="line">                        <span class="variable">$type</span>,</span><br><span class="line">                        <span class="variable">$this</span>-&gt;encodeHeader(<span class="variable">$this</span>-&gt;secureHeader(<span class="variable">$name</span>)),</span><br><span class="line">                        static::<span class="variable">$LE</span></span><br><span class="line">                    );</span><br><span class="line">                &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">                    <span class="variable">$mime</span>[] = sprintf(</span><br><span class="line">                        <span class="string">&#x27;Content-Type: %s%s&#x27;</span>,</span><br><span class="line">                        <span class="variable">$type</span>,</span><br><span class="line">                        static::<span class="variable">$LE</span></span><br><span class="line">                    );</span><br><span class="line">                &#125;</span><br><span class="line">                // RFC1341 part 5 says 7bit is assumed <span class="keyword">if</span> not specified</span><br><span class="line">                <span class="keyword">if</span> (static::ENCODING_7BIT !== <span class="variable">$encoding</span>) &#123;</span><br><span class="line">                    <span class="variable">$mime</span>[] = sprintf(<span class="string">&#x27;Content-Transfer-Encoding: %s%s&#x27;</span>, <span class="variable">$encoding</span>, static::<span class="variable">$LE</span>);</span><br><span class="line">                &#125;</span><br><span class="line"></span><br><span class="line">                //Only <span class="built_in">set</span> Content-IDs on inline attachments</span><br><span class="line">                <span class="keyword">if</span> ((string) <span class="variable">$cid</span> !== &#x27;&#x27; &amp;&amp; <span class="variable">$disposition</span> === &#x27;inline&#x27;) &#123;</span><br><span class="line">                    <span class="variable">$mime</span>[] = &#x27;Content-ID: &lt;&#x27; . <span class="variable">$this</span>-&gt;encodeHeader(<span class="variable">$this</span>-&gt;secureHeader(<span class="variable">$cid</span>)) . <span class="string">&#x27;&gt;&#x27;</span> . static::<span class="variable">$LE</span>;</span><br><span class="line">                &#125;</span><br><span class="line"></span><br><span class="line">                // If a filename contains any of these chars, it should be quoted,</span><br><span class="line">                // but not otherwise: RFC2183 &amp; RFC2045 5.1</span><br><span class="line">                // Fixes a warning <span class="keyword">in</span> IETF<span class="string">&#x27;s msglint MIME checker</span></span><br><span class="line"><span class="string">                // Allow for bypassing the Content-Disposition header totally</span></span><br><span class="line"><span class="string">                if (!empty($disposition)) &#123;</span></span><br><span class="line"><span class="string">                    $encoded_name = $this-&gt;encodeHeader($this-&gt;secureHeader($name));</span></span><br><span class="line"><span class="string">                    if (preg_match(&#x27;</span>/[ ()&lt;&gt;@,;:<span class="string">&quot;\/\[\]?=]/&#x27;, <span class="variable">$encoded_name</span>)) &#123;</span></span><br><span class="line"><span class="string">                        <span class="variable">$mime</span>[] = sprintf(</span></span><br><span class="line"><span class="string">                            &#x27;Content-Disposition: %s; filename=&quot;</span>%s<span class="string">&quot;%s&#x27;,</span></span><br><span class="line"><span class="string">                            <span class="variable">$disposition</span>,</span></span><br><span class="line"><span class="string">                            <span class="variable">$encoded_name</span>,</span></span><br><span class="line"><span class="string">                            static::<span class="variable">$LE</span> . static::<span class="variable">$LE</span></span></span><br><span class="line"><span class="string">                        );</span></span><br><span class="line"><span class="string">                    &#125; elseif (!empty(<span class="variable">$encoded_name</span>)) &#123;</span></span><br><span class="line"><span class="string">                        <span class="variable">$mime</span>[] = sprintf(</span></span><br><span class="line"><span class="string">                            &#x27;Content-Disposition: %s; filename=%s%s&#x27;,</span></span><br><span class="line"><span class="string">                            <span class="variable">$disposition</span>,</span></span><br><span class="line"><span class="string">                            <span class="variable">$encoded_name</span>,</span></span><br><span class="line"><span class="string">                            static::<span class="variable">$LE</span> . static::<span class="variable">$LE</span></span></span><br><span class="line"><span class="string">                        );</span></span><br><span class="line"><span class="string">                    &#125; else &#123;</span></span><br><span class="line"><span class="string">                        <span class="variable">$mime</span>[] = sprintf(</span></span><br><span class="line"><span class="string">                            &#x27;Content-Disposition: %s%s&#x27;,</span></span><br><span class="line"><span class="string">                            <span class="variable">$disposition</span>,</span></span><br><span class="line"><span class="string">                            static::<span class="variable">$LE</span> . static::<span class="variable">$LE</span></span></span><br><span class="line"><span class="string">                        );</span></span><br><span class="line"><span class="string">                    &#125;</span></span><br><span class="line"><span class="string">                &#125; else &#123;</span></span><br><span class="line"><span class="string">                    <span class="variable">$mime</span>[] = static::<span class="variable">$LE</span>;</span></span><br><span class="line"><span class="string">                &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">                // Encode as string attachment</span></span><br><span class="line"><span class="string">                if (<span class="variable">$bString</span>) &#123;</span></span><br><span class="line"><span class="string">                    <span class="variable">$mime</span>[] = <span class="variable">$this</span>-&gt;encodeString(<span class="variable">$string</span>, <span class="variable">$encoding</span>);</span></span><br><span class="line"><span class="string">                &#125; else &#123;</span></span><br><span class="line"><span class="string">                    <span class="variable">$mime</span>[] = <span class="variable">$this</span>-&gt;encodeFile(<span class="variable">$path</span>, <span class="variable">$encoding</span>);</span></span><br><span class="line"><span class="string">                &#125;</span></span><br><span class="line"><span class="string">                if (<span class="variable">$this</span>-&gt;isError()) &#123;</span></span><br><span class="line"><span class="string">                    return &#x27;&#x27;;</span></span><br><span class="line"><span class="string">                &#125;</span></span><br><span class="line"><span class="string">                <span class="variable">$mime</span>[] = static::<span class="variable">$LE</span>;</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        <span class="variable">$mime</span>[] = sprintf(&#x27;--%s--%s&#x27;, <span class="variable">$boundary</span>, static::<span class="variable">$LE</span>);</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        return implode(&#x27;&#x27;, <span class="variable">$mime</span>);</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Encode a file attachment in requested format.</span></span><br><span class="line"><span class="string">     * Returns an empty string on failure.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$path</span>     The full path to the file</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$encoding</span> The encoding to use; one of &#x27;base64&#x27;, &#x27;7bit&#x27;, &#x27;8bit&#x27;, &#x27;binary&#x27;, &#x27;quoted-printable&#x27;</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return string</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    protected function encodeFile(<span class="variable">$path</span>, <span class="variable">$encoding</span> = self::ENCODING_BASE64)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        try &#123;</span></span><br><span class="line"><span class="string">            if (!static::isPermittedPath(<span class="variable">$path</span>) || !file_exists(<span class="variable">$path</span>) || !is_readable(<span class="variable">$path</span>)) &#123;</span></span><br><span class="line"><span class="string">                throw new Exception(<span class="variable">$this</span>-&gt;lang(&#x27;file_open&#x27;) . <span class="variable">$path</span>, self::STOP_CONTINUE);</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string">            <span class="variable">$file_buffer</span> = file_get_contents(<span class="variable">$path</span>);</span></span><br><span class="line"><span class="string">            if (false === <span class="variable">$file_buffer</span>) &#123;</span></span><br><span class="line"><span class="string">                throw new Exception(<span class="variable">$this</span>-&gt;lang(&#x27;file_open&#x27;) . <span class="variable">$path</span>, self::STOP_CONTINUE);</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string">            <span class="variable">$file_buffer</span> = <span class="variable">$this</span>-&gt;encodeString(<span class="variable">$file_buffer</span>, <span class="variable">$encoding</span>);</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">            return <span class="variable">$file_buffer</span>;</span></span><br><span class="line"><span class="string">        &#125; catch (Exception <span class="variable">$exc</span>) &#123;</span></span><br><span class="line"><span class="string">            <span class="variable">$this</span>-&gt;setError(<span class="variable">$exc</span>-&gt;getMessage());</span></span><br><span class="line"><span class="string">            <span class="variable">$this</span>-&gt;edebug(<span class="variable">$exc</span>-&gt;getMessage());</span></span><br><span class="line"><span class="string">            if (<span class="variable">$this</span>-&gt;exceptions) &#123;</span></span><br><span class="line"><span class="string">                throw <span class="variable">$exc</span>;</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string">            return &#x27;&#x27;;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Encode a string in requested format.</span></span><br><span class="line"><span class="string">     * Returns an empty string on failure.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$str</span>      The text to encode</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$encoding</span> The encoding to use; one of &#x27;base64&#x27;, &#x27;7bit&#x27;, &#x27;8bit&#x27;, &#x27;binary&#x27;, &#x27;quoted-printable&#x27;</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @throws Exception</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return string</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function encodeString(<span class="variable">$str</span>, <span class="variable">$encoding</span> = self::ENCODING_BASE64)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        <span class="variable">$encoded</span> = &#x27;&#x27;;</span></span><br><span class="line"><span class="string">        switch (strtolower(<span class="variable">$encoding</span>)) &#123;</span></span><br><span class="line"><span class="string">            case static::ENCODING_BASE64:</span></span><br><span class="line"><span class="string">                <span class="variable">$encoded</span> = chunk_split(</span></span><br><span class="line"><span class="string">                    base64_encode(<span class="variable">$str</span>),</span></span><br><span class="line"><span class="string">                    static::STD_LINE_LENGTH,</span></span><br><span class="line"><span class="string">                    static::<span class="variable">$LE</span></span></span><br><span class="line"><span class="string">                );</span></span><br><span class="line"><span class="string">                break;</span></span><br><span class="line"><span class="string">            case static::ENCODING_7BIT:</span></span><br><span class="line"><span class="string">            case static::ENCODING_8BIT:</span></span><br><span class="line"><span class="string">                <span class="variable">$encoded</span> = static::normalizeBreaks(<span class="variable">$str</span>);</span></span><br><span class="line"><span class="string">                // Make sure it ends with a line break</span></span><br><span class="line"><span class="string">                if (substr(<span class="variable">$encoded</span>, -(strlen(static::<span class="variable">$LE</span>))) !== static::<span class="variable">$LE</span>) &#123;</span></span><br><span class="line"><span class="string">                    <span class="variable">$encoded</span> .= static::<span class="variable">$LE</span>;</span></span><br><span class="line"><span class="string">                &#125;</span></span><br><span class="line"><span class="string">                break;</span></span><br><span class="line"><span class="string">            case static::ENCODING_BINARY:</span></span><br><span class="line"><span class="string">                <span class="variable">$encoded</span> = <span class="variable">$str</span>;</span></span><br><span class="line"><span class="string">                break;</span></span><br><span class="line"><span class="string">            case static::ENCODING_QUOTED_PRINTABLE:</span></span><br><span class="line"><span class="string">                <span class="variable">$encoded</span> = <span class="variable">$this</span>-&gt;encodeQP(<span class="variable">$str</span>);</span></span><br><span class="line"><span class="string">                break;</span></span><br><span class="line"><span class="string">            default:</span></span><br><span class="line"><span class="string">                <span class="variable">$this</span>-&gt;setError(<span class="variable">$this</span>-&gt;lang(&#x27;encoding&#x27;) . <span class="variable">$encoding</span>);</span></span><br><span class="line"><span class="string">                if (<span class="variable">$this</span>-&gt;exceptions) &#123;</span></span><br><span class="line"><span class="string">                    throw new Exception(<span class="variable">$this</span>-&gt;lang(&#x27;encoding&#x27;) . <span class="variable">$encoding</span>);</span></span><br><span class="line"><span class="string">                &#125;</span></span><br><span class="line"><span class="string">                break;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        return <span class="variable">$encoded</span>;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Encode a header value (not including its label) optimally.</span></span><br><span class="line"><span class="string">     * Picks shortest of Q, B, or none. Result includes folding if needed.</span></span><br><span class="line"><span class="string">     * See RFC822 definitions for phrase, comment and text positions.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$str</span>      The header value to encode</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$position</span> What context the string will be used in</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return string</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function encodeHeader(<span class="variable">$str</span>, <span class="variable">$position</span> = &#x27;text&#x27;)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        <span class="variable">$matchcount</span> = 0;</span></span><br><span class="line"><span class="string">        switch (strtolower(<span class="variable">$position</span>)) &#123;</span></span><br><span class="line"><span class="string">            case &#x27;phrase&#x27;:</span></span><br><span class="line"><span class="string">                if (!preg_match(&#x27;/[\200-\377]/&#x27;, <span class="variable">$str</span>)) &#123;</span></span><br><span class="line"><span class="string">                    // Can&#x27;t use addslashes as we don&#x27;t know the value of magic_quotes_sybase</span></span><br><span class="line"><span class="string">                    <span class="variable">$encoded</span> = addcslashes(<span class="variable">$str</span>, &quot;</span>\0..\37\177\\\&quot;<span class="string">&quot;);</span></span><br><span class="line"><span class="string">                    if ((<span class="variable">$str</span> === <span class="variable">$encoded</span>) &amp;&amp; !preg_match(&#x27;/[^A-Za-z0-9!#$%&amp;\&#x27;*+\/=?^_`&#123;|&#125;~ -]/&#x27;, <span class="variable">$str</span>)) &#123;</span></span><br><span class="line"><span class="string">                        return <span class="variable">$encoded</span>;</span></span><br><span class="line"><span class="string">                    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">                    return &quot;</span>\&quot;<span class="variable">$encoded</span>\&quot;<span class="string">&quot;;</span></span><br><span class="line"><span class="string">                &#125;</span></span><br><span class="line"><span class="string">                <span class="variable">$matchcount</span> = preg_match_all(&#x27;/[^\040\041\043-\133\135-\176]/&#x27;, <span class="variable">$str</span>, <span class="variable">$matches</span>);</span></span><br><span class="line"><span class="string">                break;</span></span><br><span class="line"><span class="string">            /* @noinspection PhpMissingBreakStatementInspection */</span></span><br><span class="line"><span class="string">            case &#x27;comment&#x27;:</span></span><br><span class="line"><span class="string">                <span class="variable">$matchcount</span> = preg_match_all(&#x27;/[()&quot;</span>]/<span class="string">&#x27;, $str, $matches);</span></span><br><span class="line"><span class="string">            //fallthrough</span></span><br><span class="line"><span class="string">            case &#x27;</span>text<span class="string">&#x27;:</span></span><br><span class="line"><span class="string">            default:</span></span><br><span class="line"><span class="string">                $matchcount += preg_match_all(&#x27;</span>/[\000-\010\013\014\016-\037\177-\377]/<span class="string">&#x27;, $str, $matches);</span></span><br><span class="line"><span class="string">                break;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        if ($this-&gt;has8bitChars($str)) &#123;</span></span><br><span class="line"><span class="string">            $charset = $this-&gt;CharSet;</span></span><br><span class="line"><span class="string">        &#125; else &#123;</span></span><br><span class="line"><span class="string">            $charset = static::CHARSET_ASCII;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        // Q/B encoding adds 8 chars and the charset (&quot;` =?&lt;charset&gt;?[QB]?&lt;content&gt;?=`&quot;).</span></span><br><span class="line"><span class="string">        $overhead = 8 + strlen($charset);</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        if (&#x27;</span>mail<span class="string">&#x27; === $this-&gt;Mailer) &#123;</span></span><br><span class="line"><span class="string">            $maxlen = static::MAIL_MAX_LINE_LENGTH - $overhead;</span></span><br><span class="line"><span class="string">        &#125; else &#123;</span></span><br><span class="line"><span class="string">            $maxlen = static::MAX_LINE_LENGTH - $overhead;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        // Select the encoding that produces the shortest output and/or prevents corruption.</span></span><br><span class="line"><span class="string">        if ($matchcount &gt; strlen($str) / 3) &#123;</span></span><br><span class="line"><span class="string">            // More than 1/3 of the content needs encoding, use B-encode.</span></span><br><span class="line"><span class="string">            $encoding = &#x27;</span>B<span class="string">&#x27;;</span></span><br><span class="line"><span class="string">        &#125; elseif ($matchcount &gt; 0) &#123;</span></span><br><span class="line"><span class="string">            // Less than 1/3 of the content needs encoding, use Q-encode.</span></span><br><span class="line"><span class="string">            $encoding = &#x27;</span>Q<span class="string">&#x27;;</span></span><br><span class="line"><span class="string">        &#125; elseif (strlen($str) &gt; $maxlen) &#123;</span></span><br><span class="line"><span class="string">            // No encoding needed, but value exceeds max line length, use Q-encode to prevent corruption.</span></span><br><span class="line"><span class="string">            $encoding = &#x27;</span>Q<span class="string">&#x27;;</span></span><br><span class="line"><span class="string">        &#125; else &#123;</span></span><br><span class="line"><span class="string">            // No reformatting needed</span></span><br><span class="line"><span class="string">            $encoding = false;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        switch ($encoding) &#123;</span></span><br><span class="line"><span class="string">            case &#x27;</span>B<span class="string">&#x27;:</span></span><br><span class="line"><span class="string">                if ($this-&gt;hasMultiBytes($str)) &#123;</span></span><br><span class="line"><span class="string">                    // Use a custom function which correctly encodes and wraps long</span></span><br><span class="line"><span class="string">                    // multibyte strings without breaking lines within a character</span></span><br><span class="line"><span class="string">                    $encoded = $this-&gt;base64EncodeWrapMB($str, &quot;\n&quot;);</span></span><br><span class="line"><span class="string">                &#125; else &#123;</span></span><br><span class="line"><span class="string">                    $encoded = base64_encode($str);</span></span><br><span class="line"><span class="string">                    $maxlen -= $maxlen % 4;</span></span><br><span class="line"><span class="string">                    $encoded = trim(chunk_split($encoded, $maxlen, &quot;\n&quot;));</span></span><br><span class="line"><span class="string">                &#125;</span></span><br><span class="line"><span class="string">                $encoded = preg_replace(&#x27;</span>/^(.*)$/m<span class="string">&#x27;, &#x27;</span> =?<span class="string">&#x27; . $charset . &quot;?$encoding?\\1?=&quot;, $encoded);</span></span><br><span class="line"><span class="string">                break;</span></span><br><span class="line"><span class="string">            case &#x27;</span>Q<span class="string">&#x27;:</span></span><br><span class="line"><span class="string">                $encoded = $this-&gt;encodeQ($str, $position);</span></span><br><span class="line"><span class="string">                $encoded = $this-&gt;wrapText($encoded, $maxlen, true);</span></span><br><span class="line"><span class="string">                $encoded = str_replace(&#x27;</span>=<span class="string">&#x27; . static::$LE, &quot;\n&quot;, trim($encoded));</span></span><br><span class="line"><span class="string">                $encoded = preg_replace(&#x27;</span>/^(.*)$/m<span class="string">&#x27;, &#x27;</span> =?<span class="string">&#x27; . $charset . &quot;?$encoding?\\1?=&quot;, $encoded);</span></span><br><span class="line"><span class="string">                break;</span></span><br><span class="line"><span class="string">            default:</span></span><br><span class="line"><span class="string">                return $str;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        return trim(static::normalizeBreaks($encoded));</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Check if a string contains multi-byte characters.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string $str multi-byte text to wrap encode</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return bool</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function hasMultiBytes($str)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        if (function_exists(&#x27;</span>mb_strlen<span class="string">&#x27;)) &#123;</span></span><br><span class="line"><span class="string">            return strlen($str) &gt; mb_strlen($str, $this-&gt;CharSet);</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        // Assume no multibytes (we can&#x27;</span>t handle without mbstring <span class="built_in">functions</span> anyway)</span><br><span class="line">        <span class="built_in">return</span> <span class="literal">false</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Does a string contain any 8-bit chars (<span class="keyword">in</span> any charset)?</span><br><span class="line">     *</span><br><span class="line">     * @param string <span class="variable">$text</span></span><br><span class="line">     *</span><br><span class="line">     * @<span class="built_in">return</span> bool</span><br><span class="line">     */</span><br><span class="line">    public <span class="keyword">function</span> has8bitChars(<span class="variable">$text</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="built_in">return</span> (bool) preg_match(<span class="string">&#x27;/[\x80-\xFF]/&#x27;</span>, <span class="variable">$text</span>);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Encode and wrap long multibyte strings <span class="keyword">for</span> mail headers</span><br><span class="line">     * without breaking lines within a character.</span><br><span class="line">     * Adapted from a <span class="keyword">function</span> by paravoid.</span><br><span class="line">     *</span><br><span class="line">     * @see http://www.php.net/manual/en/function.mb-encode-mimeheader.php<span class="comment">#60283</span></span><br><span class="line">     *</span><br><span class="line">     * @param string <span class="variable">$str</span>       multi-byte text to wrap encode</span><br><span class="line">     * @param string <span class="variable">$linebreak</span> string to use as linefeed/end-of-line</span><br><span class="line">     *</span><br><span class="line">     * @<span class="built_in">return</span> string</span><br><span class="line">     */</span><br><span class="line">    public <span class="keyword">function</span> base64EncodeWrapMB(<span class="variable">$str</span>, <span class="variable">$linebreak</span> = null)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="variable">$start</span> = <span class="string">&#x27;=?&#x27;</span> . <span class="variable">$this</span>-&gt;CharSet . <span class="string">&#x27;?B?&#x27;</span>;</span><br><span class="line">        <span class="variable">$end</span> = <span class="string">&#x27;?=&#x27;</span>;</span><br><span class="line">        <span class="variable">$encoded</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">        <span class="keyword">if</span> (null === <span class="variable">$linebreak</span>) &#123;</span><br><span class="line">            <span class="variable">$linebreak</span> = static::<span class="variable">$LE</span>;</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        <span class="variable">$mb_length</span> = mb_strlen(<span class="variable">$str</span>, <span class="variable">$this</span>-&gt;CharSet);</span><br><span class="line">        // Each line must have length &lt;= 75, including <span class="variable">$start</span> and <span class="variable">$end</span></span><br><span class="line">        <span class="variable">$length</span> = 75 - strlen(<span class="variable">$start</span>) - strlen(<span class="variable">$end</span>);</span><br><span class="line">        // Average multi-byte ratio</span><br><span class="line">        <span class="variable">$ratio</span> = <span class="variable">$mb_length</span> / strlen(<span class="variable">$str</span>);</span><br><span class="line">        // Base64 has a 4:3 ratio</span><br><span class="line">        <span class="variable">$avgLength</span> = floor(<span class="variable">$length</span> * <span class="variable">$ratio</span> * .75);</span><br><span class="line"></span><br><span class="line">        <span class="variable">$offset</span> = 0;</span><br><span class="line">        <span class="keyword">for</span> (<span class="variable">$i</span> = 0; <span class="variable">$i</span> &lt; <span class="variable">$mb_length</span>; <span class="variable">$i</span> += <span class="variable">$offset</span>) &#123;</span><br><span class="line">            <span class="variable">$lookBack</span> = 0;</span><br><span class="line">            <span class="keyword">do</span> &#123;</span><br><span class="line">                <span class="variable">$offset</span> = <span class="variable">$avgLength</span> - <span class="variable">$lookBack</span>;</span><br><span class="line">                <span class="variable">$chunk</span> = mb_substr(<span class="variable">$str</span>, <span class="variable">$i</span>, <span class="variable">$offset</span>, <span class="variable">$this</span>-&gt;CharSet);</span><br><span class="line">                <span class="variable">$chunk</span> = base64_encode(<span class="variable">$chunk</span>);</span><br><span class="line">                ++<span class="variable">$lookBack</span>;</span><br><span class="line">            &#125; <span class="keyword">while</span> (strlen(<span class="variable">$chunk</span>) &gt; <span class="variable">$length</span>);</span><br><span class="line">            <span class="variable">$encoded</span> .= <span class="variable">$chunk</span> . <span class="variable">$linebreak</span>;</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        // Chomp the last linefeed</span><br><span class="line">        <span class="built_in">return</span> substr(<span class="variable">$encoded</span>, 0, -strlen(<span class="variable">$linebreak</span>));</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Encode a string <span class="keyword">in</span> quoted-printable format.</span><br><span class="line">     * According to RFC2045 section 6.7.</span><br><span class="line">     *</span><br><span class="line">     * @param string <span class="variable">$string</span> The text to encode</span><br><span class="line">     *</span><br><span class="line">     * @<span class="built_in">return</span> string</span><br><span class="line">     */</span><br><span class="line">    public <span class="keyword">function</span> encodeQP(<span class="variable">$string</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="built_in">return</span> static::normalizeBreaks(quoted_printable_encode(<span class="variable">$string</span>));</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Encode a string using Q encoding.</span><br><span class="line">     *</span><br><span class="line">     * @see http://tools.ietf.org/html/rfc2047<span class="comment">#section-4.2</span></span><br><span class="line">     *</span><br><span class="line">     * @param string <span class="variable">$str</span>      the text to encode</span><br><span class="line">     * @param string <span class="variable">$position</span> Where the text is going to be used, see the RFC <span class="keyword">for</span> what that means</span><br><span class="line">     *</span><br><span class="line">     * @<span class="built_in">return</span> string</span><br><span class="line">     */</span><br><span class="line">    public <span class="keyword">function</span> encodeQ(<span class="variable">$str</span>, <span class="variable">$position</span> = <span class="string">&#x27;text&#x27;</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        // There should not be any EOL <span class="keyword">in</span> the string</span><br><span class="line">        <span class="variable">$pattern</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">        <span class="variable">$encoded</span> = str_replace([<span class="string">&quot;\r&quot;</span>, <span class="string">&quot;\n&quot;</span>], <span class="string">&#x27;&#x27;</span>, <span class="variable">$str</span>);</span><br><span class="line">        switch (strtolower(<span class="variable">$position</span>)) &#123;</span><br><span class="line">            <span class="keyword">case</span> <span class="string">&#x27;phrase&#x27;</span>:</span><br><span class="line">                // RFC 2047 section 5.3</span><br><span class="line">                <span class="variable">$pattern</span> = <span class="string">&#x27;^A-Za-z0-9!*+\/ -&#x27;</span>;</span><br><span class="line">                <span class="built_in">break</span>;</span><br><span class="line">            /*</span><br><span class="line">             * RFC 2047 section 5.2.</span><br><span class="line">             * Build <span class="variable">$pattern</span> without including delimiters and []</span><br><span class="line">             */</span><br><span class="line">            /* @noinspection PhpMissingBreakStatementInspection */</span><br><span class="line">            <span class="keyword">case</span> <span class="string">&#x27;comment&#x27;</span>:</span><br><span class="line">                <span class="variable">$pattern</span> = <span class="string">&#x27;\(\)&quot;&#x27;</span>;</span><br><span class="line">            /* Intentional fall through */</span><br><span class="line">            <span class="keyword">case</span> <span class="string">&#x27;text&#x27;</span>:</span><br><span class="line">            default:</span><br><span class="line">                // RFC 2047 section 5.1</span><br><span class="line">                // Replace every high ascii, control, =, ? and _ characters</span><br><span class="line">                <span class="variable">$pattern</span> = <span class="string">&#x27;\000-\011\013\014\016-\037\075\077\137\177-\377&#x27;</span> . <span class="variable">$pattern</span>;</span><br><span class="line">                <span class="built_in">break</span>;</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="variable">$matches</span> = [];</span><br><span class="line">        <span class="keyword">if</span> (preg_match_all(<span class="string">&quot;/[&#123;<span class="variable">$pattern</span>&#125;]/&quot;</span>, <span class="variable">$encoded</span>, <span class="variable">$matches</span>)) &#123;</span><br><span class="line">            // If the string contains an <span class="string">&#x27;=&#x27;</span>, make sure it<span class="string">&#x27;s the first thing we replace</span></span><br><span class="line"><span class="string">            // so as to avoid double-encoding</span></span><br><span class="line"><span class="string">            $eqkey = array_search(&#x27;</span>=<span class="string">&#x27;, $matches[0], true);</span></span><br><span class="line"><span class="string">            if (false !== $eqkey) &#123;</span></span><br><span class="line"><span class="string">                unset($matches[0][$eqkey]);</span></span><br><span class="line"><span class="string">                array_unshift($matches[0], &#x27;</span>=<span class="string">&#x27;);</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string">            foreach (array_unique($matches[0]) as $char) &#123;</span></span><br><span class="line"><span class="string">                $encoded = str_replace($char, &#x27;</span>=<span class="string">&#x27; . sprintf(&#x27;</span>%02X<span class="string">&#x27;, ord($char)), $encoded);</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        // Replace spaces with _ (more readable than =20)</span></span><br><span class="line"><span class="string">        // RFC 2047 section 4.2(2)</span></span><br><span class="line"><span class="string">        return str_replace(&#x27;</span> <span class="string">&#x27;, &#x27;</span>_<span class="string">&#x27;, $encoded);</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Add a string or binary attachment (non-filesystem).</span></span><br><span class="line"><span class="string">     * This method can be used to attach ascii or binary data,</span></span><br><span class="line"><span class="string">     * such as a BLOB record from a database.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string $string      String attachment data</span></span><br><span class="line"><span class="string">     * @param string $filename    Name of the attachment</span></span><br><span class="line"><span class="string">     * @param string $encoding    File encoding (see $Encoding)</span></span><br><span class="line"><span class="string">     * @param string $type        File extension (MIME) type</span></span><br><span class="line"><span class="string">     * @param string $disposition Disposition to use</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @throws Exception</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return bool True on successfully adding an attachment</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function addStringAttachment(</span></span><br><span class="line"><span class="string">        $string,</span></span><br><span class="line"><span class="string">        $filename,</span></span><br><span class="line"><span class="string">        $encoding = self::ENCODING_BASE64,</span></span><br><span class="line"><span class="string">        $type = &#x27;</span><span class="string">&#x27;,</span></span><br><span class="line"><span class="string">        $disposition = &#x27;</span>attachment<span class="string">&#x27;</span></span><br><span class="line"><span class="string">    ) &#123;</span></span><br><span class="line"><span class="string">        try &#123;</span></span><br><span class="line"><span class="string">            // If a MIME type is not specified, try to work it out from the file name</span></span><br><span class="line"><span class="string">            if (&#x27;</span><span class="string">&#x27; === $type) &#123;</span></span><br><span class="line"><span class="string">                $type = static::filenameToType($filename);</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">            if (!$this-&gt;validateEncoding($encoding)) &#123;</span></span><br><span class="line"><span class="string">                throw new Exception($this-&gt;lang(&#x27;</span>encoding<span class="string">&#x27;) . $encoding);</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">            // Append to $attachment array</span></span><br><span class="line"><span class="string">            $this-&gt;attachment[] = [</span></span><br><span class="line"><span class="string">                0 =&gt; $string,</span></span><br><span class="line"><span class="string">                1 =&gt; $filename,</span></span><br><span class="line"><span class="string">                2 =&gt; static::mb_pathinfo($filename, PATHINFO_BASENAME),</span></span><br><span class="line"><span class="string">                3 =&gt; $encoding,</span></span><br><span class="line"><span class="string">                4 =&gt; $type,</span></span><br><span class="line"><span class="string">                5 =&gt; true, // isStringAttachment</span></span><br><span class="line"><span class="string">                6 =&gt; $disposition,</span></span><br><span class="line"><span class="string">                7 =&gt; 0,</span></span><br><span class="line"><span class="string">            ];</span></span><br><span class="line"><span class="string">        &#125; catch (Exception $exc) &#123;</span></span><br><span class="line"><span class="string">            $this-&gt;setError($exc-&gt;getMessage());</span></span><br><span class="line"><span class="string">            $this-&gt;edebug($exc-&gt;getMessage());</span></span><br><span class="line"><span class="string">            if ($this-&gt;exceptions) &#123;</span></span><br><span class="line"><span class="string">                throw $exc;</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">            return false;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        return true;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Add an embedded (inline) attachment from a file.</span></span><br><span class="line"><span class="string">     * This can include images, sounds, and just about any other document type.</span></span><br><span class="line"><span class="string">     * These differ from &#x27;</span>regular<span class="string">&#x27; attachments in that they are intended to be</span></span><br><span class="line"><span class="string">     * displayed inline with the message, not just attached for download.</span></span><br><span class="line"><span class="string">     * This is used in HTML messages that embed the images</span></span><br><span class="line"><span class="string">     * the HTML refers to using the $cid value.</span></span><br><span class="line"><span class="string">     * Never use a user-supplied path to a file!</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string $path        Path to the attachment</span></span><br><span class="line"><span class="string">     * @param string $cid         Content ID of the attachment; Use this to reference</span></span><br><span class="line"><span class="string">     *                            the content when using an embedded image in HTML</span></span><br><span class="line"><span class="string">     * @param string $name        Overrides the attachment name</span></span><br><span class="line"><span class="string">     * @param string $encoding    File encoding (see $Encoding)</span></span><br><span class="line"><span class="string">     * @param string $type        File MIME type</span></span><br><span class="line"><span class="string">     * @param string $disposition Disposition to use</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @throws Exception</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return bool True on successfully adding an attachment</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function addEmbeddedImage(</span></span><br><span class="line"><span class="string">        $path,</span></span><br><span class="line"><span class="string">        $cid,</span></span><br><span class="line"><span class="string">        $name = &#x27;</span><span class="string">&#x27;,</span></span><br><span class="line"><span class="string">        $encoding = self::ENCODING_BASE64,</span></span><br><span class="line"><span class="string">        $type = &#x27;</span><span class="string">&#x27;,</span></span><br><span class="line"><span class="string">        $disposition = &#x27;</span>inline<span class="string">&#x27;</span></span><br><span class="line"><span class="string">    ) &#123;</span></span><br><span class="line"><span class="string">        try &#123;</span></span><br><span class="line"><span class="string">            if (!static::isPermittedPath($path) || !@is_file($path) || !is_readable($path)) &#123;</span></span><br><span class="line"><span class="string">                throw new Exception($this-&gt;lang(&#x27;</span>file_access<span class="string">&#x27;) . $path, self::STOP_CONTINUE);</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">            // If a MIME type is not specified, try to work it out from the file name</span></span><br><span class="line"><span class="string">            if (&#x27;</span><span class="string">&#x27; === $type) &#123;</span></span><br><span class="line"><span class="string">                $type = static::filenameToType($path);</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">            if (!$this-&gt;validateEncoding($encoding)) &#123;</span></span><br><span class="line"><span class="string">                throw new Exception($this-&gt;lang(&#x27;</span>encoding<span class="string">&#x27;) . $encoding);</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">            $filename = (string) static::mb_pathinfo($path, PATHINFO_BASENAME);</span></span><br><span class="line"><span class="string">            if (&#x27;</span><span class="string">&#x27; === $name) &#123;</span></span><br><span class="line"><span class="string">                $name = $filename;</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">            // Append to $attachment array</span></span><br><span class="line"><span class="string">            $this-&gt;attachment[] = [</span></span><br><span class="line"><span class="string">                0 =&gt; $path,</span></span><br><span class="line"><span class="string">                1 =&gt; $filename,</span></span><br><span class="line"><span class="string">                2 =&gt; $name,</span></span><br><span class="line"><span class="string">                3 =&gt; $encoding,</span></span><br><span class="line"><span class="string">                4 =&gt; $type,</span></span><br><span class="line"><span class="string">                5 =&gt; false, // isStringAttachment</span></span><br><span class="line"><span class="string">                6 =&gt; $disposition,</span></span><br><span class="line"><span class="string">                7 =&gt; $cid,</span></span><br><span class="line"><span class="string">            ];</span></span><br><span class="line"><span class="string">        &#125; catch (Exception $exc) &#123;</span></span><br><span class="line"><span class="string">            $this-&gt;setError($exc-&gt;getMessage());</span></span><br><span class="line"><span class="string">            $this-&gt;edebug($exc-&gt;getMessage());</span></span><br><span class="line"><span class="string">            if ($this-&gt;exceptions) &#123;</span></span><br><span class="line"><span class="string">                throw $exc;</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">            return false;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        return true;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Add an embedded stringified attachment.</span></span><br><span class="line"><span class="string">     * This can include images, sounds, and just about any other document type.</span></span><br><span class="line"><span class="string">     * If your filename doesn&#x27;</span>t contain an extension, be sure to <span class="built_in">set</span> the <span class="variable">$type</span> to an appropriate MIME <span class="built_in">type</span>.</span><br><span class="line">     *</span><br><span class="line">     * @param string <span class="variable">$string</span>      The attachment binary data</span><br><span class="line">     * @param string <span class="variable">$cid</span>         Content ID of the attachment; Use this to reference</span><br><span class="line">     *                            the content when using an embedded image <span class="keyword">in</span> HTML</span><br><span class="line">     * @param string <span class="variable">$name</span>        A filename <span class="keyword">for</span> the attachment. If this contains an extension,</span><br><span class="line">     *                            PHPMailer will attempt to <span class="built_in">set</span> a MIME <span class="built_in">type</span> <span class="keyword">for</span> the attachment.</span><br><span class="line">     *                            For example <span class="string">&#x27;file.jpg&#x27;</span> would get an <span class="string">&#x27;image/jpeg&#x27;</span> MIME <span class="built_in">type</span>.</span><br><span class="line">     * @param string <span class="variable">$encoding</span>    File encoding (see <span class="variable">$Encoding</span>), defaults to <span class="string">&#x27;base64&#x27;</span></span><br><span class="line">     * @param string <span class="variable">$type</span>        MIME <span class="built_in">type</span> - will be used <span class="keyword">in</span> preference to any automatically derived <span class="built_in">type</span></span><br><span class="line">     * @param string <span class="variable">$disposition</span> Disposition to use</span><br><span class="line">     *</span><br><span class="line">     * @throws Exception</span><br><span class="line">     *</span><br><span class="line">     * @<span class="built_in">return</span> bool True on successfully adding an attachment</span><br><span class="line">     */</span><br><span class="line">    public <span class="keyword">function</span> addStringEmbeddedImage(</span><br><span class="line">        <span class="variable">$string</span>,</span><br><span class="line">        <span class="variable">$cid</span>,</span><br><span class="line">        <span class="variable">$name</span> = <span class="string">&#x27;&#x27;</span>,</span><br><span class="line">        <span class="variable">$encoding</span> = self::ENCODING_BASE64,</span><br><span class="line">        <span class="variable">$type</span> = <span class="string">&#x27;&#x27;</span>,</span><br><span class="line">        <span class="variable">$disposition</span> = <span class="string">&#x27;inline&#x27;</span></span><br><span class="line">    ) &#123;</span><br><span class="line">        try &#123;</span><br><span class="line">            // If a MIME <span class="built_in">type</span> is not specified, try to work it out from the name</span><br><span class="line">            <span class="keyword">if</span> (<span class="string">&#x27;&#x27;</span> === <span class="variable">$type</span> &amp;&amp; !empty(<span class="variable">$name</span>)) &#123;</span><br><span class="line">                <span class="variable">$type</span> = static::filenameToType(<span class="variable">$name</span>);</span><br><span class="line">            &#125;</span><br><span class="line"></span><br><span class="line">            <span class="keyword">if</span> (!<span class="variable">$this</span>-&gt;validateEncoding(<span class="variable">$encoding</span>)) &#123;</span><br><span class="line">                throw new Exception(<span class="variable">$this</span>-&gt;lang(<span class="string">&#x27;encoding&#x27;</span>) . <span class="variable">$encoding</span>);</span><br><span class="line">            &#125;</span><br><span class="line"></span><br><span class="line">            // Append to <span class="variable">$attachment</span> array</span><br><span class="line">            <span class="variable">$this</span>-&gt;attachment[] = [</span><br><span class="line">                0 =&gt; <span class="variable">$string</span>,</span><br><span class="line">                1 =&gt; <span class="variable">$name</span>,</span><br><span class="line">                2 =&gt; <span class="variable">$name</span>,</span><br><span class="line">                3 =&gt; <span class="variable">$encoding</span>,</span><br><span class="line">                4 =&gt; <span class="variable">$type</span>,</span><br><span class="line">                5 =&gt; <span class="literal">true</span>, // isStringAttachment</span><br><span class="line">                6 =&gt; <span class="variable">$disposition</span>,</span><br><span class="line">                7 =&gt; <span class="variable">$cid</span>,</span><br><span class="line">            ];</span><br><span class="line">        &#125; catch (Exception <span class="variable">$exc</span>) &#123;</span><br><span class="line">            <span class="variable">$this</span>-&gt;setError(<span class="variable">$exc</span>-&gt;getMessage());</span><br><span class="line">            <span class="variable">$this</span>-&gt;edebug(<span class="variable">$exc</span>-&gt;getMessage());</span><br><span class="line">            <span class="keyword">if</span> (<span class="variable">$this</span>-&gt;exceptions) &#123;</span><br><span class="line">                throw <span class="variable">$exc</span>;</span><br><span class="line">            &#125;</span><br><span class="line"></span><br><span class="line">            <span class="built_in">return</span> <span class="literal">false</span>;</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        <span class="built_in">return</span> <span class="literal">true</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Validate encodings.</span><br><span class="line">     *</span><br><span class="line">     * @param string <span class="variable">$encoding</span></span><br><span class="line">     *</span><br><span class="line">     * @<span class="built_in">return</span> bool</span><br><span class="line">     */</span><br><span class="line">    protected <span class="keyword">function</span> validateEncoding(<span class="variable">$encoding</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="built_in">return</span> in_array(</span><br><span class="line">            <span class="variable">$encoding</span>,</span><br><span class="line">            [</span><br><span class="line">                self::ENCODING_7BIT,</span><br><span class="line">                self::ENCODING_QUOTED_PRINTABLE,</span><br><span class="line">                self::ENCODING_BASE64,</span><br><span class="line">                self::ENCODING_8BIT,</span><br><span class="line">                self::ENCODING_BINARY,</span><br><span class="line">            ],</span><br><span class="line">            <span class="literal">true</span></span><br><span class="line">        );</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Check <span class="keyword">if</span> an embedded attachment is present with this cid.</span><br><span class="line">     *</span><br><span class="line">     * @param string <span class="variable">$cid</span></span><br><span class="line">     *</span><br><span class="line">     * @<span class="built_in">return</span> bool</span><br><span class="line">     */</span><br><span class="line">    protected <span class="keyword">function</span> cidExists(<span class="variable">$cid</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        foreach (<span class="variable">$this</span>-&gt;attachment as <span class="variable">$attachment</span>) &#123;</span><br><span class="line">            <span class="keyword">if</span> (<span class="string">&#x27;inline&#x27;</span> === <span class="variable">$attachment</span>[6] &amp;&amp; <span class="variable">$cid</span> === <span class="variable">$attachment</span>[7]) &#123;</span><br><span class="line">                <span class="built_in">return</span> <span class="literal">true</span>;</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        <span class="built_in">return</span> <span class="literal">false</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Check <span class="keyword">if</span> an inline attachment is present.</span><br><span class="line">     *</span><br><span class="line">     * @<span class="built_in">return</span> bool</span><br><span class="line">     */</span><br><span class="line">    public <span class="keyword">function</span> <span class="function"><span class="title">inlineImageExists</span></span>()</span><br><span class="line">    &#123;</span><br><span class="line">        foreach (<span class="variable">$this</span>-&gt;attachment as <span class="variable">$attachment</span>) &#123;</span><br><span class="line">            <span class="keyword">if</span> (<span class="string">&#x27;inline&#x27;</span> === <span class="variable">$attachment</span>[6]) &#123;</span><br><span class="line">                <span class="built_in">return</span> <span class="literal">true</span>;</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        <span class="built_in">return</span> <span class="literal">false</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Check <span class="keyword">if</span> an attachment (non-inline) is present.</span><br><span class="line">     *</span><br><span class="line">     * @<span class="built_in">return</span> bool</span><br><span class="line">     */</span><br><span class="line">    public <span class="keyword">function</span> <span class="function"><span class="title">attachmentExists</span></span>()</span><br><span class="line">    &#123;</span><br><span class="line">        foreach (<span class="variable">$this</span>-&gt;attachment as <span class="variable">$attachment</span>) &#123;</span><br><span class="line">            <span class="keyword">if</span> (<span class="string">&#x27;attachment&#x27;</span> === <span class="variable">$attachment</span>[6]) &#123;</span><br><span class="line">                <span class="built_in">return</span> <span class="literal">true</span>;</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        <span class="built_in">return</span> <span class="literal">false</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Check <span class="keyword">if</span> this message has an alternative body <span class="built_in">set</span>.</span><br><span class="line">     *</span><br><span class="line">     * @<span class="built_in">return</span> bool</span><br><span class="line">     */</span><br><span class="line">    public <span class="keyword">function</span> <span class="function"><span class="title">alternativeExists</span></span>()</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="built_in">return</span> !empty(<span class="variable">$this</span>-&gt;AltBody);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Clear queued addresses of given kind.</span><br><span class="line">     *</span><br><span class="line">     * @param string <span class="variable">$kind</span> <span class="string">&#x27;to&#x27;</span>, <span class="string">&#x27;cc&#x27;</span>, or <span class="string">&#x27;bcc&#x27;</span></span><br><span class="line">     */</span><br><span class="line">    public <span class="keyword">function</span> clearQueuedAddresses(<span class="variable">$kind</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="variable">$this</span>-&gt;RecipientsQueue = array_filter(</span><br><span class="line">            <span class="variable">$this</span>-&gt;RecipientsQueue,</span><br><span class="line">            static <span class="keyword">function</span> (<span class="variable">$params</span>) use (<span class="variable">$kind</span>) &#123;</span><br><span class="line">                <span class="built_in">return</span> <span class="variable">$params</span>[0] !== <span class="variable">$kind</span>;</span><br><span class="line">            &#125;</span><br><span class="line">        );</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Clear all To recipients.</span><br><span class="line">     */</span><br><span class="line">    public <span class="keyword">function</span> <span class="function"><span class="title">clearAddresses</span></span>()</span><br><span class="line">    &#123;</span><br><span class="line">        foreach (<span class="variable">$this</span>-&gt;to as <span class="variable">$to</span>) &#123;</span><br><span class="line">            <span class="built_in">unset</span>(<span class="variable">$this</span>-&gt;all_recipients[strtolower(<span class="variable">$to</span>[0])]);</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="variable">$this</span>-&gt;to = [];</span><br><span class="line">        <span class="variable">$this</span>-&gt;clearQueuedAddresses(<span class="string">&#x27;to&#x27;</span>);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Clear all CC recipients.</span><br><span class="line">     */</span><br><span class="line">    public <span class="keyword">function</span> <span class="function"><span class="title">clearCCs</span></span>()</span><br><span class="line">    &#123;</span><br><span class="line">        foreach (<span class="variable">$this</span>-&gt;cc as <span class="variable">$cc</span>) &#123;</span><br><span class="line">            <span class="built_in">unset</span>(<span class="variable">$this</span>-&gt;all_recipients[strtolower(<span class="variable">$cc</span>[0])]);</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="variable">$this</span>-&gt;cc = [];</span><br><span class="line">        <span class="variable">$this</span>-&gt;clearQueuedAddresses(<span class="string">&#x27;cc&#x27;</span>);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Clear all BCC recipients.</span><br><span class="line">     */</span><br><span class="line">    public <span class="keyword">function</span> <span class="function"><span class="title">clearBCCs</span></span>()</span><br><span class="line">    &#123;</span><br><span class="line">        foreach (<span class="variable">$this</span>-&gt;bcc as <span class="variable">$bcc</span>) &#123;</span><br><span class="line">            <span class="built_in">unset</span>(<span class="variable">$this</span>-&gt;all_recipients[strtolower(<span class="variable">$bcc</span>[0])]);</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="variable">$this</span>-&gt;bcc = [];</span><br><span class="line">        <span class="variable">$this</span>-&gt;clearQueuedAddresses(<span class="string">&#x27;bcc&#x27;</span>);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Clear all ReplyTo recipients.</span><br><span class="line">     */</span><br><span class="line">    public <span class="keyword">function</span> <span class="function"><span class="title">clearReplyTos</span></span>()</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="variable">$this</span>-&gt;ReplyTo = [];</span><br><span class="line">        <span class="variable">$this</span>-&gt;ReplyToQueue = [];</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Clear all recipient types.</span><br><span class="line">     */</span><br><span class="line">    public <span class="keyword">function</span> <span class="function"><span class="title">clearAllRecipients</span></span>()</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="variable">$this</span>-&gt;to = [];</span><br><span class="line">        <span class="variable">$this</span>-&gt;cc = [];</span><br><span class="line">        <span class="variable">$this</span>-&gt;bcc = [];</span><br><span class="line">        <span class="variable">$this</span>-&gt;all_recipients = [];</span><br><span class="line">        <span class="variable">$this</span>-&gt;RecipientsQueue = [];</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Clear all filesystem, string, and binary attachments.</span><br><span class="line">     */</span><br><span class="line">    public <span class="keyword">function</span> <span class="function"><span class="title">clearAttachments</span></span>()</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="variable">$this</span>-&gt;attachment = [];</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Clear all custom headers.</span><br><span class="line">     */</span><br><span class="line">    public <span class="keyword">function</span> <span class="function"><span class="title">clearCustomHeaders</span></span>()</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="variable">$this</span>-&gt;CustomHeader = [];</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Add an error message to the error container.</span><br><span class="line">     *</span><br><span class="line">     * @param string <span class="variable">$msg</span></span><br><span class="line">     */</span><br><span class="line">    protected <span class="keyword">function</span> setError(<span class="variable">$msg</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        ++<span class="variable">$this</span>-&gt;error_count;</span><br><span class="line">        <span class="keyword">if</span> (<span class="string">&#x27;smtp&#x27;</span> === <span class="variable">$this</span>-&gt;Mailer &amp;&amp; null !== <span class="variable">$this</span>-&gt;smtp) &#123;</span><br><span class="line">            <span class="variable">$lasterror</span> = <span class="variable">$this</span>-&gt;smtp-&gt;getError();</span><br><span class="line">            <span class="keyword">if</span> (!empty(<span class="variable">$lasterror</span>[<span class="string">&#x27;error&#x27;</span>])) &#123;</span><br><span class="line">                <span class="variable">$msg</span> .= <span class="variable">$this</span>-&gt;lang(<span class="string">&#x27;smtp_error&#x27;</span>) . <span class="variable">$lasterror</span>[<span class="string">&#x27;error&#x27;</span>];</span><br><span class="line">                <span class="keyword">if</span> (!empty(<span class="variable">$lasterror</span>[<span class="string">&#x27;detail&#x27;</span>])) &#123;</span><br><span class="line">                    <span class="variable">$msg</span> .= <span class="string">&#x27; Detail: &#x27;</span> . <span class="variable">$lasterror</span>[<span class="string">&#x27;detail&#x27;</span>];</span><br><span class="line">                &#125;</span><br><span class="line">                <span class="keyword">if</span> (!empty(<span class="variable">$lasterror</span>[<span class="string">&#x27;smtp_code&#x27;</span>])) &#123;</span><br><span class="line">                    <span class="variable">$msg</span> .= <span class="string">&#x27; SMTP code: &#x27;</span> . <span class="variable">$lasterror</span>[<span class="string">&#x27;smtp_code&#x27;</span>];</span><br><span class="line">                &#125;</span><br><span class="line">                <span class="keyword">if</span> (!empty(<span class="variable">$lasterror</span>[<span class="string">&#x27;smtp_code_ex&#x27;</span>])) &#123;</span><br><span class="line">                    <span class="variable">$msg</span> .= <span class="string">&#x27; Additional SMTP info: &#x27;</span> . <span class="variable">$lasterror</span>[<span class="string">&#x27;smtp_code_ex&#x27;</span>];</span><br><span class="line">                &#125;</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="variable">$this</span>-&gt;ErrorInfo = <span class="variable">$msg</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * Return an RFC 822 formatted <span class="built_in">date</span>.</span><br><span class="line">     *</span><br><span class="line">     * @<span class="built_in">return</span> string</span><br><span class="line">     */</span><br><span class="line">    public static <span class="keyword">function</span> <span class="function"><span class="title">rfcDate</span></span>()</span><br><span class="line">    &#123;</span><br><span class="line">        // Set the time zone to whatever the default is to avoid 500 errors</span><br><span class="line">        // Will default to UTC <span class="keyword">if</span> it<span class="string">&#x27;s not set properly in php.ini</span></span><br><span class="line"><span class="string">        date_default_timezone_set(@date_default_timezone_get());</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        return date(&#x27;</span>D, j M Y H:i:s O<span class="string">&#x27;);</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Get the server hostname.</span></span><br><span class="line"><span class="string">     * Returns &#x27;</span>localhost.localdomain<span class="string">&#x27; if unknown.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return string</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    protected function serverHostname()</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        $result = &#x27;</span><span class="string">&#x27;;</span></span><br><span class="line"><span class="string">        if (!empty($this-&gt;Hostname)) &#123;</span></span><br><span class="line"><span class="string">            $result = $this-&gt;Hostname;</span></span><br><span class="line"><span class="string">        &#125; elseif (isset($_SERVER) &amp;&amp; array_key_exists(&#x27;</span>SERVER_NAME<span class="string">&#x27;, $_SERVER)) &#123;</span></span><br><span class="line"><span class="string">            $result = $_SERVER[&#x27;</span>SERVER_NAME<span class="string">&#x27;];</span></span><br><span class="line"><span class="string">        &#125; elseif (function_exists(&#x27;</span>gethostname<span class="string">&#x27;) &amp;&amp; gethostname() !== false) &#123;</span></span><br><span class="line"><span class="string">            $result = gethostname();</span></span><br><span class="line"><span class="string">        &#125; elseif (php_uname(&#x27;</span>n<span class="string">&#x27;) !== false) &#123;</span></span><br><span class="line"><span class="string">            $result = php_uname(&#x27;</span>n<span class="string">&#x27;);</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        if (!static::isValidHost($result)) &#123;</span></span><br><span class="line"><span class="string">            return &#x27;</span>localhost.localdomain<span class="string">&#x27;;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        return $result;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Validate whether a string contains a valid value to use as a hostname or IP address.</span></span><br><span class="line"><span class="string">     * IPv6 addresses must include [], e.g. `[::1]`, not just `::1`.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string $host The host name or IP address to check</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return bool</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public static function isValidHost($host)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        //Simple syntax limits</span></span><br><span class="line"><span class="string">        if (empty($host)</span></span><br><span class="line"><span class="string">            || !is_string($host)</span></span><br><span class="line"><span class="string">            || strlen($host) &gt; 256</span></span><br><span class="line"><span class="string">            || !preg_match(&#x27;</span>/^([a-zA-Z\d.-]*|\[[a-fA-F\d:]+])$/<span class="string">&#x27;, $host)</span></span><br><span class="line"><span class="string">        ) &#123;</span></span><br><span class="line"><span class="string">            return false;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        //Looks like a bracketed IPv6 address</span></span><br><span class="line"><span class="string">        if (strlen($host) &gt; 2 &amp;&amp; substr($host, 0, 1) === &#x27;</span>[<span class="string">&#x27; &amp;&amp; substr($host, -1, 1) === &#x27;</span>]<span class="string">&#x27;) &#123;</span></span><br><span class="line"><span class="string">            return filter_var(substr($host, 1, -1), FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) !== false;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        //If removing all the dots results in a numeric string, it must be an IPv4 address.</span></span><br><span class="line"><span class="string">        //Need to check this first because otherwise things like `999.0.0.0` are considered valid host names</span></span><br><span class="line"><span class="string">        if (is_numeric(str_replace(&#x27;</span>.<span class="string">&#x27;, &#x27;</span><span class="string">&#x27;, $host))) &#123;</span></span><br><span class="line"><span class="string">            //Is it a valid IPv4 address?</span></span><br><span class="line"><span class="string">            return filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) !== false;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        if (filter_var(&#x27;</span>http://<span class="string">&#x27; . $host, FILTER_VALIDATE_URL) !== false) &#123;</span></span><br><span class="line"><span class="string">            //Is it a syntactically valid hostname?</span></span><br><span class="line"><span class="string">            return true;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        return false;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Get an error message in the current language.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string $key</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return string</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    protected function lang($key)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        if (count($this-&gt;language) &lt; 1) &#123;</span></span><br><span class="line"><span class="string">            $this-&gt;setLanguage(); // set the default language</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        if (array_key_exists($key, $this-&gt;language)) &#123;</span></span><br><span class="line"><span class="string">            if (&#x27;</span>smtp_connect_failed<span class="string">&#x27; === $key) &#123;</span></span><br><span class="line"><span class="string">                //Include a link to troubleshooting docs on SMTP connection failure</span></span><br><span class="line"><span class="string">                //this is by far the biggest cause of support questions</span></span><br><span class="line"><span class="string">                //but it&#x27;</span>s usually not PHPMailer<span class="string">&#x27;s fault.</span></span><br><span class="line"><span class="string">                return $this-&gt;language[$key] . &#x27;</span> https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting<span class="string">&#x27;;</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">            return $this-&gt;language[$key];</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        //Return the key as a fallback</span></span><br><span class="line"><span class="string">        return $key;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Check if an error occurred.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return bool True if an error did occur</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function isError()</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        return $this-&gt;error_count &gt; 0;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Add a custom header.</span></span><br><span class="line"><span class="string">     * $name value can be overloaded to contain</span></span><br><span class="line"><span class="string">     * both header name and value (name:value).</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string      $name  Custom header name</span></span><br><span class="line"><span class="string">     * @param string|null $value Header value</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @throws Exception</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function addCustomHeader($name, $value = null)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        if (null === $value &amp;&amp; strpos($name, &#x27;</span>:<span class="string">&#x27;) !== false) &#123;</span></span><br><span class="line"><span class="string">            // Value passed in as name:value</span></span><br><span class="line"><span class="string">            list($name, $value) = explode(&#x27;</span>:<span class="string">&#x27;, $name, 2);</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        $name = trim($name);</span></span><br><span class="line"><span class="string">        $value = trim($value);</span></span><br><span class="line"><span class="string">        //Ensure name is not empty, and that neither name nor value contain line breaks</span></span><br><span class="line"><span class="string">        if (empty($name) || strpbrk($name . $value, &quot;\r\n&quot;) !== false) &#123;</span></span><br><span class="line"><span class="string">            if ($this-&gt;exceptions) &#123;</span></span><br><span class="line"><span class="string">                throw new Exception(&#x27;</span>Invalid header name or value<span class="string">&#x27;);</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">            return false;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        $this-&gt;CustomHeader[] = [$name, $value];</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        return true;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Returns all custom headers.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return array</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function getCustomHeaders()</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        return $this-&gt;CustomHeader;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Create a message body from an HTML string.</span></span><br><span class="line"><span class="string">     * Automatically inlines images and creates a plain-text version by converting the HTML,</span></span><br><span class="line"><span class="string">     * overwriting any existing values in Body and AltBody.</span></span><br><span class="line"><span class="string">     * Do not source $message content from user input!</span></span><br><span class="line"><span class="string">     * $basedir is prepended when handling relative URLs, e.g. &lt;img src=&quot;/images/a.png&quot;&gt; and must not be empty</span></span><br><span class="line"><span class="string">     * will look for an image file in $basedir/images/a.png and convert it to inline.</span></span><br><span class="line"><span class="string">     * If you don&#x27;</span>t provide a <span class="variable">$basedir</span>, relative paths will be left untouched (and thus probably <span class="built_in">break</span> <span class="keyword">in</span> email)</span><br><span class="line">     * Converts data-uri images into embedded attachments.</span><br><span class="line">     * If you don<span class="string">&#x27;t want to apply these transformations to your HTML, just set Body and AltBody directly.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string        $message  HTML message string</span></span><br><span class="line"><span class="string">     * @param string        $basedir  Absolute path to a base directory to prepend to relative paths to images</span></span><br><span class="line"><span class="string">     * @param bool|callable $advanced Whether to use the internal HTML to text converter</span></span><br><span class="line"><span class="string">     *                                or your own custom converter @return string $message The transformed message Body</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @throws Exception</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @see PHPMailer::html2text()</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function msgHTML($message, $basedir = &#x27;</span><span class="string">&#x27;, $advanced = false)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        preg_match_all(&#x27;</span>/(?&lt;!-)(src|background)=[<span class="string">&quot;\&#x27;](.*)[&quot;</span>\<span class="string">&#x27;]/Ui&#x27;</span>, <span class="variable">$message</span>, <span class="variable">$images</span>);</span><br><span class="line">        <span class="keyword">if</span> (array_key_exists(2, <span class="variable">$images</span>)) &#123;</span><br><span class="line">            <span class="keyword">if</span> (strlen(<span class="variable">$basedir</span>) &gt; 1 &amp;&amp; <span class="string">&#x27;/&#x27;</span> !== substr(<span class="variable">$basedir</span>, -1)) &#123;</span><br><span class="line">                // Ensure <span class="variable">$basedir</span> has a trailing /</span><br><span class="line">                <span class="variable">$basedir</span> .= <span class="string">&#x27;/&#x27;</span>;</span><br><span class="line">            &#125;</span><br><span class="line">            foreach (<span class="variable">$images</span>[2] as <span class="variable">$imgindex</span> =&gt; <span class="variable">$url</span>) &#123;</span><br><span class="line">                // Convert data URIs into embedded images</span><br><span class="line">                //e.g. <span class="string">&quot;&quot;</span></span><br><span class="line">                <span class="variable">$match</span> = [];</span><br><span class="line">                <span class="keyword">if</span> (preg_match(<span class="string">&#x27;#^data:(image/(?:jpe?g|gif|png));?(base64)?,(.+)#&#x27;</span>, <span class="variable">$url</span>, <span class="variable">$match</span>)) &#123;</span><br><span class="line">                    <span class="keyword">if</span> (count(<span class="variable">$match</span>) === 4 &amp;&amp; static::ENCODING_BASE64 === <span class="variable">$match</span>[2]) &#123;</span><br><span class="line">                        <span class="variable">$data</span> = base64_decode(<span class="variable">$match</span>[3]);</span><br><span class="line">                    &#125; elseif (<span class="string">&#x27;&#x27;</span> === <span class="variable">$match</span>[2]) &#123;</span><br><span class="line">                        <span class="variable">$data</span> = rawurldecode(<span class="variable">$match</span>[3]);</span><br><span class="line">                    &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">                        //Not recognised so leave it alone</span><br><span class="line">                        <span class="built_in">continue</span>;</span><br><span class="line">                    &#125;</span><br><span class="line">                    //Hash the decoded data, not the URL, so that the same data-URI image used <span class="keyword">in</span> multiple places</span><br><span class="line">                    //will only be embedded once, even <span class="keyword">if</span> it used a different encoding</span><br><span class="line">                    <span class="variable">$cid</span> = substr(<span class="built_in">hash</span>(<span class="string">&#x27;sha256&#x27;</span>, <span class="variable">$data</span>), 0, 32) . <span class="string">&#x27;@phpmailer.0&#x27;</span>; // RFC2392 S 2</span><br><span class="line"></span><br><span class="line">                    <span class="keyword">if</span> (!<span class="variable">$this</span>-&gt;cidExists(<span class="variable">$cid</span>)) &#123;</span><br><span class="line">                        <span class="variable">$this</span>-&gt;addStringEmbeddedImage(</span><br><span class="line">                            <span class="variable">$data</span>,</span><br><span class="line">                            <span class="variable">$cid</span>,</span><br><span class="line">                            <span class="string">&#x27;embed&#x27;</span> . <span class="variable">$imgindex</span>,</span><br><span class="line">                            static::ENCODING_BASE64,</span><br><span class="line">                            <span class="variable">$match</span>[1]</span><br><span class="line">                        );</span><br><span class="line">                    &#125;</span><br><span class="line">                    <span class="variable">$message</span> = str_replace(</span><br><span class="line">                        <span class="variable">$images</span>[0][<span class="variable">$imgindex</span>],</span><br><span class="line">                        <span class="variable">$images</span>[1][<span class="variable">$imgindex</span>] . <span class="string">&#x27;=&quot;cid:&#x27;</span> . <span class="variable">$cid</span> . <span class="string">&#x27;&quot;&#x27;</span>,</span><br><span class="line">                        <span class="variable">$message</span></span><br><span class="line">                    );</span><br><span class="line">                    <span class="built_in">continue</span>;</span><br><span class="line">                &#125;</span><br><span class="line">                <span class="keyword">if</span> (// Only process relative URLs <span class="keyword">if</span> a basedir is provided (i.e. no absolute <span class="built_in">local</span> paths)</span><br><span class="line">                    !empty(<span class="variable">$basedir</span>)</span><br><span class="line">                    // Ignore URLs containing parent <span class="built_in">dir</span> traversal (..)</span><br><span class="line">                    &amp;&amp; (strpos(<span class="variable">$url</span>, <span class="string">&#x27;..&#x27;</span>) === <span class="literal">false</span>)</span><br><span class="line">                    // Do not change urls that are already inline images</span><br><span class="line">                    &amp;&amp; 0 !== strpos(<span class="variable">$url</span>, <span class="string">&#x27;cid:&#x27;</span>)</span><br><span class="line">                    // Do not change absolute URLs, including anonymous protocol</span><br><span class="line">                    &amp;&amp; !preg_match(<span class="string">&#x27;#^[a-z][a-z0-9+.-]*:?//#i&#x27;</span>, <span class="variable">$url</span>)</span><br><span class="line">                ) &#123;</span><br><span class="line">                    <span class="variable">$filename</span> = static::mb_pathinfo(<span class="variable">$url</span>, PATHINFO_BASENAME);</span><br><span class="line">                    <span class="variable">$directory</span> = <span class="built_in">dirname</span>(<span class="variable">$url</span>);</span><br><span class="line">                    <span class="keyword">if</span> (<span class="string">&#x27;.&#x27;</span> === <span class="variable">$directory</span>) &#123;</span><br><span class="line">                        <span class="variable">$directory</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">                    &#125;</span><br><span class="line">                    // RFC2392 S 2</span><br><span class="line">                    <span class="variable">$cid</span> = substr(<span class="built_in">hash</span>(<span class="string">&#x27;sha256&#x27;</span>, <span class="variable">$url</span>), 0, 32) . <span class="string">&#x27;@phpmailer.0&#x27;</span>;</span><br><span class="line">                    <span class="keyword">if</span> (strlen(<span class="variable">$basedir</span>) &gt; 1 &amp;&amp; <span class="string">&#x27;/&#x27;</span> !== substr(<span class="variable">$basedir</span>, -1)) &#123;</span><br><span class="line">                        <span class="variable">$basedir</span> .= <span class="string">&#x27;/&#x27;</span>;</span><br><span class="line">                    &#125;</span><br><span class="line">                    <span class="keyword">if</span> (strlen(<span class="variable">$directory</span>) &gt; 1 &amp;&amp; <span class="string">&#x27;/&#x27;</span> !== substr(<span class="variable">$directory</span>, -1)) &#123;</span><br><span class="line">                        <span class="variable">$directory</span> .= <span class="string">&#x27;/&#x27;</span>;</span><br><span class="line">                    &#125;</span><br><span class="line">                    <span class="keyword">if</span> (<span class="variable">$this</span>-&gt;addEmbeddedImage(</span><br><span class="line">                        <span class="variable">$basedir</span> . <span class="variable">$directory</span> . <span class="variable">$filename</span>,</span><br><span class="line">                        <span class="variable">$cid</span>,</span><br><span class="line">                        <span class="variable">$filename</span>,</span><br><span class="line">                        static::ENCODING_BASE64,</span><br><span class="line">                        static::_mime_types((string) static::mb_pathinfo(<span class="variable">$filename</span>, PATHINFO_EXTENSION))</span><br><span class="line">                    )</span><br><span class="line">                    ) &#123;</span><br><span class="line">                        <span class="variable">$message</span> = preg_replace(</span><br><span class="line">                            <span class="string">&#x27;/&#x27;</span> . <span class="variable">$images</span>[1][<span class="variable">$imgindex</span>] . <span class="string">&#x27;=[&quot;\&#x27;</span>]<span class="string">&#x27; . preg_quote($url, &#x27;</span>/<span class="string">&#x27;) . &#x27;</span>[<span class="string">&quot;\&#x27;]/Ui&#x27;,</span></span><br><span class="line"><span class="string">                            <span class="variable">$images</span>[1][<span class="variable">$imgindex</span>] . &#x27;=&quot;</span>cid:<span class="string">&#x27; . $cid . &#x27;</span><span class="string">&quot;&#x27;,</span></span><br><span class="line"><span class="string">                            <span class="variable">$message</span></span></span><br><span class="line"><span class="string">                        );</span></span><br><span class="line"><span class="string">                    &#125;</span></span><br><span class="line"><span class="string">                &#125;</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        <span class="variable">$this</span>-&gt;isHTML();</span></span><br><span class="line"><span class="string">        // Convert all message body line breaks to LE, makes quoted-printable encoding work much better</span></span><br><span class="line"><span class="string">        <span class="variable">$this</span>-&gt;Body = static::normalizeBreaks(<span class="variable">$message</span>);</span></span><br><span class="line"><span class="string">        <span class="variable">$this</span>-&gt;AltBody = static::normalizeBreaks(<span class="variable">$this</span>-&gt;html2text(<span class="variable">$message</span>, <span class="variable">$advanced</span>));</span></span><br><span class="line"><span class="string">        if (!<span class="variable">$this</span>-&gt;alternativeExists()) &#123;</span></span><br><span class="line"><span class="string">            <span class="variable">$this</span>-&gt;AltBody = &#x27;This is an HTML-only message. To view it, activate HTML in your email application.&#x27;</span></span><br><span class="line"><span class="string">                . static::<span class="variable">$LE</span>;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        return <span class="variable">$this</span>-&gt;Body;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Convert an HTML string into plain text.</span></span><br><span class="line"><span class="string">     * This is used by msgHTML().</span></span><br><span class="line"><span class="string">     * Note - older versions of this function used a bundled advanced converter</span></span><br><span class="line"><span class="string">     * which was removed for license reasons in #232.</span></span><br><span class="line"><span class="string">     * Example usage:</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * ```php</span></span><br><span class="line"><span class="string">     * // Use default conversion</span></span><br><span class="line"><span class="string">     * <span class="variable">$plain</span> = <span class="variable">$mail</span>-&gt;html2text(<span class="variable">$html</span>);</span></span><br><span class="line"><span class="string">     * // Use your own custom converter</span></span><br><span class="line"><span class="string">     * <span class="variable">$plain</span> = <span class="variable">$mail</span>-&gt;html2text(<span class="variable">$html</span>, function(<span class="variable">$html</span>) &#123;</span></span><br><span class="line"><span class="string">     *     <span class="variable">$converter</span> = new MyHtml2text(<span class="variable">$html</span>);</span></span><br><span class="line"><span class="string">     *     return <span class="variable">$converter</span>-&gt;get_text();</span></span><br><span class="line"><span class="string">     * &#125;);</span></span><br><span class="line"><span class="string">     * ```</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string        <span class="variable">$html</span>     The HTML text to convert</span></span><br><span class="line"><span class="string">     * @param bool|callable <span class="variable">$advanced</span> Any boolean value to use the internal converter,</span></span><br><span class="line"><span class="string">     *                                or provide your own callable for custom conversion</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return string</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function html2text(<span class="variable">$html</span>, <span class="variable">$advanced</span> = false)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        if (is_callable(<span class="variable">$advanced</span>)) &#123;</span></span><br><span class="line"><span class="string">            return <span class="variable">$advanced</span>(<span class="variable">$html</span>);</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        return html_entity_decode(</span></span><br><span class="line"><span class="string">            trim(strip_tags(preg_replace(&#x27;/&lt;(head|title|style|script)[^&gt;]*&gt;.*?&lt;\/\\1&gt;/si&#x27;, &#x27;&#x27;, <span class="variable">$html</span>))),</span></span><br><span class="line"><span class="string">            ENT_QUOTES,</span></span><br><span class="line"><span class="string">            <span class="variable">$this</span>-&gt;CharSet</span></span><br><span class="line"><span class="string">        );</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Get the MIME type for a file extension.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$ext</span> File extension</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return string MIME type of file</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public static function _mime_types(<span class="variable">$ext</span> = &#x27;&#x27;)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        <span class="variable">$mimes</span> = [</span></span><br><span class="line"><span class="string">            &#x27;xl&#x27; =&gt; &#x27;application/excel&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;js&#x27; =&gt; &#x27;application/javascript&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;hqx&#x27; =&gt; &#x27;application/mac-binhex40&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;cpt&#x27; =&gt; &#x27;application/mac-compactpro&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;bin&#x27; =&gt; &#x27;application/macbinary&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;doc&#x27; =&gt; &#x27;application/msword&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;word&#x27; =&gt; &#x27;application/msword&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;xlsx&#x27; =&gt; &#x27;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;xltx&#x27; =&gt; &#x27;application/vnd.openxmlformats-officedocument.spreadsheetml.template&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;potx&#x27; =&gt; &#x27;application/vnd.openxmlformats-officedocument.presentationml.template&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;ppsx&#x27; =&gt; &#x27;application/vnd.openxmlformats-officedocument.presentationml.slideshow&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;pptx&#x27; =&gt; &#x27;application/vnd.openxmlformats-officedocument.presentationml.presentation&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;sldx&#x27; =&gt; &#x27;application/vnd.openxmlformats-officedocument.presentationml.slide&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;docx&#x27; =&gt; &#x27;application/vnd.openxmlformats-officedocument.wordprocessingml.document&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;dotx&#x27; =&gt; &#x27;application/vnd.openxmlformats-officedocument.wordprocessingml.template&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;xlam&#x27; =&gt; &#x27;application/vnd.ms-excel.addin.macroEnabled.12&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;xlsb&#x27; =&gt; &#x27;application/vnd.ms-excel.sheet.binary.macroEnabled.12&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;class&#x27; =&gt; &#x27;application/octet-stream&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;dll&#x27; =&gt; &#x27;application/octet-stream&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;dms&#x27; =&gt; &#x27;application/octet-stream&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;exe&#x27; =&gt; &#x27;application/octet-stream&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;lha&#x27; =&gt; &#x27;application/octet-stream&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;lzh&#x27; =&gt; &#x27;application/octet-stream&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;psd&#x27; =&gt; &#x27;application/octet-stream&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;sea&#x27; =&gt; &#x27;application/octet-stream&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;so&#x27; =&gt; &#x27;application/octet-stream&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;oda&#x27; =&gt; &#x27;application/oda&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;pdf&#x27; =&gt; &#x27;application/pdf&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;ai&#x27; =&gt; &#x27;application/postscript&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;eps&#x27; =&gt; &#x27;application/postscript&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;ps&#x27; =&gt; &#x27;application/postscript&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;smi&#x27; =&gt; &#x27;application/smil&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;smil&#x27; =&gt; &#x27;application/smil&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;mif&#x27; =&gt; &#x27;application/vnd.mif&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;xls&#x27; =&gt; &#x27;application/vnd.ms-excel&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;ppt&#x27; =&gt; &#x27;application/vnd.ms-powerpoint&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;wbxml&#x27; =&gt; &#x27;application/vnd.wap.wbxml&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;wmlc&#x27; =&gt; &#x27;application/vnd.wap.wmlc&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;dcr&#x27; =&gt; &#x27;application/x-director&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;dir&#x27; =&gt; &#x27;application/x-director&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;dxr&#x27; =&gt; &#x27;application/x-director&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;dvi&#x27; =&gt; &#x27;application/x-dvi&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;gtar&#x27; =&gt; &#x27;application/x-gtar&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;php3&#x27; =&gt; &#x27;application/x-httpd-php&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;php4&#x27; =&gt; &#x27;application/x-httpd-php&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;php&#x27; =&gt; &#x27;application/x-httpd-php&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;phtml&#x27; =&gt; &#x27;application/x-httpd-php&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;phps&#x27; =&gt; &#x27;application/x-httpd-php-source&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;swf&#x27; =&gt; &#x27;application/x-shockwave-flash&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;sit&#x27; =&gt; &#x27;application/x-stuffit&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;tar&#x27; =&gt; &#x27;application/x-tar&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;tgz&#x27; =&gt; &#x27;application/x-tar&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;xht&#x27; =&gt; &#x27;application/xhtml+xml&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;xhtml&#x27; =&gt; &#x27;application/xhtml+xml&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;zip&#x27; =&gt; &#x27;application/zip&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;mid&#x27; =&gt; &#x27;audio/midi&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;midi&#x27; =&gt; &#x27;audio/midi&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;mp2&#x27; =&gt; &#x27;audio/mpeg&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;mp3&#x27; =&gt; &#x27;audio/mpeg&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;m4a&#x27; =&gt; &#x27;audio/mp4&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;mpga&#x27; =&gt; &#x27;audio/mpeg&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;aif&#x27; =&gt; &#x27;audio/x-aiff&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;aifc&#x27; =&gt; &#x27;audio/x-aiff&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;aiff&#x27; =&gt; &#x27;audio/x-aiff&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;ram&#x27; =&gt; &#x27;audio/x-pn-realaudio&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;rm&#x27; =&gt; &#x27;audio/x-pn-realaudio&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;rpm&#x27; =&gt; &#x27;audio/x-pn-realaudio-plugin&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;ra&#x27; =&gt; &#x27;audio/x-realaudio&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;wav&#x27; =&gt; &#x27;audio/x-wav&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;mka&#x27; =&gt; &#x27;audio/x-matroska&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;bmp&#x27; =&gt; &#x27;image/bmp&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;gif&#x27; =&gt; &#x27;image/gif&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;jpeg&#x27; =&gt; &#x27;image/jpeg&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;jpe&#x27; =&gt; &#x27;image/jpeg&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;jpg&#x27; =&gt; &#x27;image/jpeg&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;png&#x27; =&gt; &#x27;image/png&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;tiff&#x27; =&gt; &#x27;image/tiff&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;tif&#x27; =&gt; &#x27;image/tiff&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;webp&#x27; =&gt; &#x27;image/webp&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;heif&#x27; =&gt; &#x27;image/heif&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;heifs&#x27; =&gt; &#x27;image/heif-sequence&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;heic&#x27; =&gt; &#x27;image/heic&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;heics&#x27; =&gt; &#x27;image/heic-sequence&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;eml&#x27; =&gt; &#x27;message/rfc822&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;css&#x27; =&gt; &#x27;text/css&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;html&#x27; =&gt; &#x27;text/html&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;htm&#x27; =&gt; &#x27;text/html&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;shtml&#x27; =&gt; &#x27;text/html&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;log&#x27; =&gt; &#x27;text/plain&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;text&#x27; =&gt; &#x27;text/plain&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;txt&#x27; =&gt; &#x27;text/plain&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;rtx&#x27; =&gt; &#x27;text/richtext&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;rtf&#x27; =&gt; &#x27;text/rtf&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;vcf&#x27; =&gt; &#x27;text/vcard&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;vcard&#x27; =&gt; &#x27;text/vcard&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;ics&#x27; =&gt; &#x27;text/calendar&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;xml&#x27; =&gt; &#x27;text/xml&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;xsl&#x27; =&gt; &#x27;text/xml&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;wmv&#x27; =&gt; &#x27;video/x-ms-wmv&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;mpeg&#x27; =&gt; &#x27;video/mpeg&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;mpe&#x27; =&gt; &#x27;video/mpeg&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;mpg&#x27; =&gt; &#x27;video/mpeg&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;mp4&#x27; =&gt; &#x27;video/mp4&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;m4v&#x27; =&gt; &#x27;video/mp4&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;mov&#x27; =&gt; &#x27;video/quicktime&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;qt&#x27; =&gt; &#x27;video/quicktime&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;rv&#x27; =&gt; &#x27;video/vnd.rn-realvideo&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;avi&#x27; =&gt; &#x27;video/x-msvideo&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;movie&#x27; =&gt; &#x27;video/x-sgi-movie&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;webm&#x27; =&gt; &#x27;video/webm&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;mkv&#x27; =&gt; &#x27;video/x-matroska&#x27;,</span></span><br><span class="line"><span class="string">        ];</span></span><br><span class="line"><span class="string">        <span class="variable">$ext</span> = strtolower(<span class="variable">$ext</span>);</span></span><br><span class="line"><span class="string">        if (array_key_exists(<span class="variable">$ext</span>, <span class="variable">$mimes</span>)) &#123;</span></span><br><span class="line"><span class="string">            return <span class="variable">$mimes</span>[<span class="variable">$ext</span>];</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        return &#x27;application/octet-stream&#x27;;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Map a file name to a MIME type.</span></span><br><span class="line"><span class="string">     * Defaults to &#x27;application/octet-stream&#x27;, i.e.. arbitrary binary data.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$filename</span> A file name or full path, does not need to exist as a file</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return string</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public static function filenameToType(<span class="variable">$filename</span>)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        // In case the path is a URL, strip any query string before getting extension</span></span><br><span class="line"><span class="string">        <span class="variable">$qpos</span> = strpos(<span class="variable">$filename</span>, &#x27;?&#x27;);</span></span><br><span class="line"><span class="string">        if (false !== <span class="variable">$qpos</span>) &#123;</span></span><br><span class="line"><span class="string">            <span class="variable">$filename</span> = substr(<span class="variable">$filename</span>, 0, <span class="variable">$qpos</span>);</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        <span class="variable">$ext</span> = static::mb_pathinfo(<span class="variable">$filename</span>, PATHINFO_EXTENSION);</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        return static::_mime_types(<span class="variable">$ext</span>);</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Multi-byte-safe pathinfo replacement.</span></span><br><span class="line"><span class="string">     * Drop-in replacement for pathinfo(), but multibyte- and cross-platform-safe.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @see http://www.php.net/manual/en/function.pathinfo.php#107461</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string     <span class="variable">$path</span>    A filename or path, does not need to exist as a file</span></span><br><span class="line"><span class="string">     * @param int|string <span class="variable">$options</span> Either a PATHINFO_* constant,</span></span><br><span class="line"><span class="string">     *                            or a string name to return only the specified piece</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return string|array</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public static function mb_pathinfo(<span class="variable">$path</span>, <span class="variable">$options</span> = null)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        <span class="variable">$ret</span> = [&#x27;dirname&#x27; =&gt; &#x27;&#x27;, &#x27;basename&#x27; =&gt; &#x27;&#x27;, &#x27;extension&#x27; =&gt; &#x27;&#x27;, &#x27;filename&#x27; =&gt; &#x27;&#x27;];</span></span><br><span class="line"><span class="string">        <span class="variable">$pathinfo</span> = [];</span></span><br><span class="line"><span class="string">        if (preg_match(&#x27;#^(.*?)[\\\\/]*(([^/\\\\]*?)(\.([^.\\\\/]+?)|))[\\\\/.]*<span class="variable">$#m</span>&#x27;, <span class="variable">$path</span>, <span class="variable">$pathinfo</span>)) &#123;</span></span><br><span class="line"><span class="string">            if (array_key_exists(1, <span class="variable">$pathinfo</span>)) &#123;</span></span><br><span class="line"><span class="string">                <span class="variable">$ret</span>[&#x27;dirname&#x27;] = <span class="variable">$pathinfo</span>[1];</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string">            if (array_key_exists(2, <span class="variable">$pathinfo</span>)) &#123;</span></span><br><span class="line"><span class="string">                <span class="variable">$ret</span>[&#x27;basename&#x27;] = <span class="variable">$pathinfo</span>[2];</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string">            if (array_key_exists(5, <span class="variable">$pathinfo</span>)) &#123;</span></span><br><span class="line"><span class="string">                <span class="variable">$ret</span>[&#x27;extension&#x27;] = <span class="variable">$pathinfo</span>[5];</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string">            if (array_key_exists(3, <span class="variable">$pathinfo</span>)) &#123;</span></span><br><span class="line"><span class="string">                <span class="variable">$ret</span>[&#x27;filename&#x27;] = <span class="variable">$pathinfo</span>[3];</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        switch (<span class="variable">$options</span>) &#123;</span></span><br><span class="line"><span class="string">            case PATHINFO_DIRNAME:</span></span><br><span class="line"><span class="string">            case &#x27;dirname&#x27;:</span></span><br><span class="line"><span class="string">                return <span class="variable">$ret</span>[&#x27;dirname&#x27;];</span></span><br><span class="line"><span class="string">            case PATHINFO_BASENAME:</span></span><br><span class="line"><span class="string">            case &#x27;basename&#x27;:</span></span><br><span class="line"><span class="string">                return <span class="variable">$ret</span>[&#x27;basename&#x27;];</span></span><br><span class="line"><span class="string">            case PATHINFO_EXTENSION:</span></span><br><span class="line"><span class="string">            case &#x27;extension&#x27;:</span></span><br><span class="line"><span class="string">                return <span class="variable">$ret</span>[&#x27;extension&#x27;];</span></span><br><span class="line"><span class="string">            case PATHINFO_FILENAME:</span></span><br><span class="line"><span class="string">            case &#x27;filename&#x27;:</span></span><br><span class="line"><span class="string">                return <span class="variable">$ret</span>[&#x27;filename&#x27;];</span></span><br><span class="line"><span class="string">            default:</span></span><br><span class="line"><span class="string">                return <span class="variable">$ret</span>;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Set or reset instance properties.</span></span><br><span class="line"><span class="string">     * You should avoid this function - it&#x27;s more verbose, less efficient, more error-prone and</span></span><br><span class="line"><span class="string">     * harder to debug than setting properties directly.</span></span><br><span class="line"><span class="string">     * Usage Example:</span></span><br><span class="line"><span class="string">     * `<span class="variable">$mail</span>-&gt;set(&#x27;SMTPSecure&#x27;, static::ENCRYPTION_STARTTLS);`</span></span><br><span class="line"><span class="string">     *   is the same as:</span></span><br><span class="line"><span class="string">     * `<span class="variable">$mail</span>-&gt;SMTPSecure = static::ENCRYPTION_STARTTLS;`.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$name</span>  The property name to set</span></span><br><span class="line"><span class="string">     * @param mixed  <span class="variable">$value</span> The value to set the property to</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return bool</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function set(<span class="variable">$name</span>, <span class="variable">$value</span> = &#x27;&#x27;)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        if (property_exists(<span class="variable">$this</span>, <span class="variable">$name</span>)) &#123;</span></span><br><span class="line"><span class="string">            <span class="variable">$this</span>-&gt;<span class="variable">$name</span> = <span class="variable">$value</span>;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">            return true;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        <span class="variable">$this</span>-&gt;setError(<span class="variable">$this</span>-&gt;lang(&#x27;variable_set&#x27;) . <span class="variable">$name</span>);</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        return false;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Strip newlines to prevent header injection.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$str</span></span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return string</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function secureHeader(<span class="variable">$str</span>)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        return trim(str_replace([&quot;</span>\r<span class="string">&quot;, &quot;</span>\n<span class="string">&quot;], &#x27;&#x27;, <span class="variable">$str</span>));</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Normalize line breaks in a string.</span></span><br><span class="line"><span class="string">     * Converts UNIX LF, Mac CR and Windows CRLF line breaks into a single line break format.</span></span><br><span class="line"><span class="string">     * Defaults to CRLF (for message bodies) and preserves consecutive breaks.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$text</span></span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$breaktype</span> What kind of line break to use; defaults to static::<span class="variable">$LE</span></span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return string</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public static function normalizeBreaks(<span class="variable">$text</span>, <span class="variable">$breaktype</span> = null)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        if (null === <span class="variable">$breaktype</span>) &#123;</span></span><br><span class="line"><span class="string">            <span class="variable">$breaktype</span> = static::<span class="variable">$LE</span>;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        // Normalise to \n</span></span><br><span class="line"><span class="string">        <span class="variable">$text</span> = str_replace([self::CRLF, &quot;</span>\r<span class="string">&quot;], &quot;</span>\n<span class="string">&quot;, <span class="variable">$text</span>);</span></span><br><span class="line"><span class="string">        // Now convert LE as needed</span></span><br><span class="line"><span class="string">        if (&quot;</span>\n<span class="string">&quot; !== <span class="variable">$breaktype</span>) &#123;</span></span><br><span class="line"><span class="string">            <span class="variable">$text</span> = str_replace(&quot;</span>\n<span class="string">&quot;, <span class="variable">$breaktype</span>, <span class="variable">$text</span>);</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        return <span class="variable">$text</span>;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Remove trailing breaks from a string.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$text</span></span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return string The text to remove breaks from</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public static function stripTrailingWSP(<span class="variable">$text</span>)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        return rtrim(<span class="variable">$text</span>, &quot;</span> \r\n\t<span class="string">&quot;);</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Return the current line break format string.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return string</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public static function getLE()</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        return static::<span class="variable">$LE</span>;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Set the line break format string, e.g. &quot;</span>\r\n<span class="string">&quot;.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$le</span></span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    protected static function setLE(<span class="variable">$le</span>)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        static::<span class="variable">$LE</span> = <span class="variable">$le</span>;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Set the public and private key files and password for S/MIME signing.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$cert_filename</span></span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$key_filename</span></span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$key_pass</span>            Password for private key</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$extracerts_filename</span> Optional path to chain certificate</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function sign(<span class="variable">$cert_filename</span>, <span class="variable">$key_filename</span>, <span class="variable">$key_pass</span>, <span class="variable">$extracerts_filename</span> = &#x27;&#x27;)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        <span class="variable">$this</span>-&gt;sign_cert_file = <span class="variable">$cert_filename</span>;</span></span><br><span class="line"><span class="string">        <span class="variable">$this</span>-&gt;sign_key_file = <span class="variable">$key_filename</span>;</span></span><br><span class="line"><span class="string">        <span class="variable">$this</span>-&gt;sign_key_pass = <span class="variable">$key_pass</span>;</span></span><br><span class="line"><span class="string">        <span class="variable">$this</span>-&gt;sign_extracerts_file = <span class="variable">$extracerts_filename</span>;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Quoted-Printable-encode a DKIM header.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$txt</span></span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return string</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function DKIM_QP(<span class="variable">$txt</span>)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        <span class="variable">$line</span> = &#x27;&#x27;;</span></span><br><span class="line"><span class="string">        <span class="variable">$len</span> = strlen(<span class="variable">$txt</span>);</span></span><br><span class="line"><span class="string">        for (<span class="variable">$i</span> = 0; <span class="variable">$i</span> &lt; <span class="variable">$len</span>; ++<span class="variable">$i</span>) &#123;</span></span><br><span class="line"><span class="string">            <span class="variable">$ord</span> = ord(<span class="variable">$txt</span>[<span class="variable">$i</span>]);</span></span><br><span class="line"><span class="string">            if (((0x21 &lt;= <span class="variable">$ord</span>) &amp;&amp; (<span class="variable">$ord</span> &lt;= 0x3A)) || <span class="variable">$ord</span> === 0x3C || ((0x3E &lt;= <span class="variable">$ord</span>) &amp;&amp; (<span class="variable">$ord</span> &lt;= 0x7E))) &#123;</span></span><br><span class="line"><span class="string">                <span class="variable">$line</span> .= <span class="variable">$txt</span>[<span class="variable">$i</span>];</span></span><br><span class="line"><span class="string">            &#125; else &#123;</span></span><br><span class="line"><span class="string">                <span class="variable">$line</span> .= &#x27;=&#x27; . sprintf(&#x27;%02X&#x27;, <span class="variable">$ord</span>);</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        return <span class="variable">$line</span>;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Generate a DKIM signature.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$signHeader</span></span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @throws Exception</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return string The DKIM signature value</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function DKIM_Sign(<span class="variable">$signHeader</span>)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        if (!defined(&#x27;PKCS7_TEXT&#x27;)) &#123;</span></span><br><span class="line"><span class="string">            if (<span class="variable">$this</span>-&gt;exceptions) &#123;</span></span><br><span class="line"><span class="string">                throw new Exception(<span class="variable">$this</span>-&gt;lang(&#x27;extension_missing&#x27;) . &#x27;openssl&#x27;);</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">            return &#x27;&#x27;;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        <span class="variable">$privKeyStr</span> = !empty(<span class="variable">$this</span>-&gt;DKIM_private_string) ?</span></span><br><span class="line"><span class="string">            <span class="variable">$this</span>-&gt;DKIM_private_string :</span></span><br><span class="line"><span class="string">            file_get_contents(<span class="variable">$this</span>-&gt;DKIM_private);</span></span><br><span class="line"><span class="string">        if (&#x27;&#x27; !== <span class="variable">$this</span>-&gt;DKIM_passphrase) &#123;</span></span><br><span class="line"><span class="string">            <span class="variable">$privKey</span> = openssl_pkey_get_private(<span class="variable">$privKeyStr</span>, <span class="variable">$this</span>-&gt;DKIM_passphrase);</span></span><br><span class="line"><span class="string">        &#125; else &#123;</span></span><br><span class="line"><span class="string">            <span class="variable">$privKey</span> = openssl_pkey_get_private(<span class="variable">$privKeyStr</span>);</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        if (openssl_sign(<span class="variable">$signHeader</span>, <span class="variable">$signature</span>, <span class="variable">$privKey</span>, &#x27;sha256WithRSAEncryption&#x27;)) &#123;</span></span><br><span class="line"><span class="string">            openssl_pkey_free(<span class="variable">$privKey</span>);</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">            return base64_encode(<span class="variable">$signature</span>);</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        openssl_pkey_free(<span class="variable">$privKey</span>);</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        return &#x27;&#x27;;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Generate a DKIM canonicalization header.</span></span><br><span class="line"><span class="string">     * Uses the &#x27;relaxed&#x27; algorithm from RFC6376 section 3.4.2.</span></span><br><span class="line"><span class="string">     * Canonicalized headers should *always* use CRLF, regardless of mailer setting.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @see https://tools.ietf.org/html/rfc6376#section-3.4.2</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$signHeader</span> Header</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return string</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function DKIM_HeaderC(<span class="variable">$signHeader</span>)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        //Normalize breaks to CRLF (regardless of the mailer)</span></span><br><span class="line"><span class="string">        <span class="variable">$signHeader</span> = static::normalizeBreaks(<span class="variable">$signHeader</span>, self::CRLF);</span></span><br><span class="line"><span class="string">        //Unfold header lines</span></span><br><span class="line"><span class="string">        //Note PCRE \s is too broad a definition of whitespace; RFC5322 defines it as `[ \t]`</span></span><br><span class="line"><span class="string">        //@see https://tools.ietf.org/html/rfc5322#section-2.2</span></span><br><span class="line"><span class="string">        //That means this may break if you do something daft like put vertical tabs in your headers.</span></span><br><span class="line"><span class="string">        <span class="variable">$signHeader</span> = preg_replace(&#x27;/\r\n[ \t]+/&#x27;, &#x27; &#x27;, <span class="variable">$signHeader</span>);</span></span><br><span class="line"><span class="string">        //Break headers out into an array</span></span><br><span class="line"><span class="string">        <span class="variable">$lines</span> = explode(self::CRLF, <span class="variable">$signHeader</span>);</span></span><br><span class="line"><span class="string">        foreach (<span class="variable">$lines</span> as <span class="variable">$key</span> =&gt; <span class="variable">$line</span>) &#123;</span></span><br><span class="line"><span class="string">            //If the header is missing a :, skip it as it&#x27;s invalid</span></span><br><span class="line"><span class="string">            //This is likely to happen because the explode() above will also split</span></span><br><span class="line"><span class="string">            //on the trailing LE, leaving an empty line</span></span><br><span class="line"><span class="string">            if (strpos(<span class="variable">$line</span>, &#x27;:&#x27;) === false) &#123;</span></span><br><span class="line"><span class="string">                continue;</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string">            list(<span class="variable">$heading</span>, <span class="variable">$value</span>) = explode(&#x27;:&#x27;, <span class="variable">$line</span>, 2);</span></span><br><span class="line"><span class="string">            //Lower-case header name</span></span><br><span class="line"><span class="string">            <span class="variable">$heading</span> = strtolower(<span class="variable">$heading</span>);</span></span><br><span class="line"><span class="string">            //Collapse white space within the value, also convert WSP to space</span></span><br><span class="line"><span class="string">            <span class="variable">$value</span> = preg_replace(&#x27;/[ \t]+/&#x27;, &#x27; &#x27;, <span class="variable">$value</span>);</span></span><br><span class="line"><span class="string">            //RFC6376 is slightly unclear here - it says to delete space at the *end* of each value</span></span><br><span class="line"><span class="string">            //But then says to delete space before and after the colon.</span></span><br><span class="line"><span class="string">            //Net result is the same as trimming both ends of the value.</span></span><br><span class="line"><span class="string">            //By elimination, the same applies to the field name</span></span><br><span class="line"><span class="string">            <span class="variable">$lines</span>[<span class="variable">$key</span>] = trim(<span class="variable">$heading</span>, &quot;</span> \t<span class="string">&quot;) . &#x27;:&#x27; . trim(<span class="variable">$value</span>, &quot;</span> \t<span class="string">&quot;);</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        return implode(self::CRLF, <span class="variable">$lines</span>);</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Generate a DKIM canonicalization body.</span></span><br><span class="line"><span class="string">     * Uses the &#x27;simple&#x27; algorithm from RFC6376 section 3.4.3.</span></span><br><span class="line"><span class="string">     * Canonicalized bodies should *always* use CRLF, regardless of mailer setting.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @see https://tools.ietf.org/html/rfc6376#section-3.4.3</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$body</span> Message Body</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return string</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function DKIM_BodyC(<span class="variable">$body</span>)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        if (empty(<span class="variable">$body</span>)) &#123;</span></span><br><span class="line"><span class="string">            return self::CRLF;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        // Normalize line endings to CRLF</span></span><br><span class="line"><span class="string">        <span class="variable">$body</span> = static::normalizeBreaks(<span class="variable">$body</span>, self::CRLF);</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        //Reduce multiple trailing line breaks to a single one</span></span><br><span class="line"><span class="string">        return static::stripTrailingWSP(<span class="variable">$body</span>) . self::CRLF;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Create the DKIM header and body in a new message header.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$headers_line</span> Header lines</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$subject</span>      Subject</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$body</span>         Body</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @throws Exception</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return string</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function DKIM_Add(<span class="variable">$headers_line</span>, <span class="variable">$subject</span>, <span class="variable">$body</span>)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        <span class="variable">$DKIMsignatureType</span> = &#x27;rsa-sha256&#x27;; // Signature &amp; hash algorithms</span></span><br><span class="line"><span class="string">        <span class="variable">$DKIMcanonicalization</span> = &#x27;relaxed/simple&#x27;; // Canonicalization methods of header &amp; body</span></span><br><span class="line"><span class="string">        <span class="variable">$DKIMquery</span> = &#x27;dns/txt&#x27;; // Query method</span></span><br><span class="line"><span class="string">        <span class="variable">$DKIMtime</span> = time();</span></span><br><span class="line"><span class="string">        //Always sign these headers without being asked</span></span><br><span class="line"><span class="string">        //Recommended list from https://tools.ietf.org/html/rfc6376#section-5.4.1</span></span><br><span class="line"><span class="string">        <span class="variable">$autoSignHeaders</span> = [</span></span><br><span class="line"><span class="string">            &#x27;from&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;to&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;cc&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;date&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;subject&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;reply-to&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;message-id&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;content-type&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;mime-version&#x27;,</span></span><br><span class="line"><span class="string">            &#x27;x-mailer&#x27;,</span></span><br><span class="line"><span class="string">        ];</span></span><br><span class="line"><span class="string">        if (stripos(<span class="variable">$headers_line</span>, &#x27;Subject&#x27;) === false) &#123;</span></span><br><span class="line"><span class="string">            <span class="variable">$headers_line</span> .= &#x27;Subject: &#x27; . <span class="variable">$subject</span> . static::<span class="variable">$LE</span>;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        <span class="variable">$headerLines</span> = explode(static::<span class="variable">$LE</span>, <span class="variable">$headers_line</span>);</span></span><br><span class="line"><span class="string">        <span class="variable">$currentHeaderLabel</span> = &#x27;&#x27;;</span></span><br><span class="line"><span class="string">        <span class="variable">$currentHeaderValue</span> = &#x27;&#x27;;</span></span><br><span class="line"><span class="string">        <span class="variable">$parsedHeaders</span> = [];</span></span><br><span class="line"><span class="string">        <span class="variable">$headerLineIndex</span> = 0;</span></span><br><span class="line"><span class="string">        <span class="variable">$headerLineCount</span> = count(<span class="variable">$headerLines</span>);</span></span><br><span class="line"><span class="string">        foreach (<span class="variable">$headerLines</span> as <span class="variable">$headerLine</span>) &#123;</span></span><br><span class="line"><span class="string">            <span class="variable">$matches</span> = [];</span></span><br><span class="line"><span class="string">            if (preg_match(&#x27;/^([^ \t]*?)(?::[ \t]*)(.*)$/&#x27;, <span class="variable">$headerLine</span>, <span class="variable">$matches</span>)) &#123;</span></span><br><span class="line"><span class="string">                if (<span class="variable">$currentHeaderLabel</span> !== &#x27;&#x27;) &#123;</span></span><br><span class="line"><span class="string">                    //We were previously in another header; This is the start of a new header, so save the previous one</span></span><br><span class="line"><span class="string">                    <span class="variable">$parsedHeaders</span>[] = [&#x27;label&#x27; =&gt; <span class="variable">$currentHeaderLabel</span>, &#x27;value&#x27; =&gt; <span class="variable">$currentHeaderValue</span>];</span></span><br><span class="line"><span class="string">                &#125;</span></span><br><span class="line"><span class="string">                <span class="variable">$currentHeaderLabel</span> = <span class="variable">$matches</span>[1];</span></span><br><span class="line"><span class="string">                <span class="variable">$currentHeaderValue</span> = <span class="variable">$matches</span>[2];</span></span><br><span class="line"><span class="string">            &#125; elseif (preg_match(&#x27;/^[ \t]+(.*)$/&#x27;, <span class="variable">$headerLine</span>, <span class="variable">$matches</span>)) &#123;</span></span><br><span class="line"><span class="string">                //This is a folded continuation of the current header, so unfold it</span></span><br><span class="line"><span class="string">                <span class="variable">$currentHeaderValue</span> .= &#x27; &#x27; . <span class="variable">$matches</span>[1];</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string">            ++<span class="variable">$headerLineIndex</span>;</span></span><br><span class="line"><span class="string">            if (<span class="variable">$headerLineIndex</span> &gt;= <span class="variable">$headerLineCount</span>) &#123;</span></span><br><span class="line"><span class="string">                //This was the last line, so finish off this header</span></span><br><span class="line"><span class="string">                <span class="variable">$parsedHeaders</span>[] = [&#x27;label&#x27; =&gt; <span class="variable">$currentHeaderLabel</span>, &#x27;value&#x27; =&gt; <span class="variable">$currentHeaderValue</span>];</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        <span class="variable">$copiedHeaders</span> = [];</span></span><br><span class="line"><span class="string">        <span class="variable">$headersToSignKeys</span> = [];</span></span><br><span class="line"><span class="string">        <span class="variable">$headersToSign</span> = [];</span></span><br><span class="line"><span class="string">        foreach (<span class="variable">$parsedHeaders</span> as <span class="variable">$header</span>) &#123;</span></span><br><span class="line"><span class="string">            //Is this header one that must be included in the DKIM signature?</span></span><br><span class="line"><span class="string">            if (in_array(strtolower(<span class="variable">$header</span>[&#x27;label&#x27;]), <span class="variable">$autoSignHeaders</span>, true)) &#123;</span></span><br><span class="line"><span class="string">                <span class="variable">$headersToSignKeys</span>[] = <span class="variable">$header</span>[&#x27;label&#x27;];</span></span><br><span class="line"><span class="string">                <span class="variable">$headersToSign</span>[] = <span class="variable">$header</span>[&#x27;label&#x27;] . &#x27;: &#x27; . <span class="variable">$header</span>[&#x27;value&#x27;];</span></span><br><span class="line"><span class="string">                if (<span class="variable">$this</span>-&gt;DKIM_copyHeaderFields) &#123;</span></span><br><span class="line"><span class="string">                    <span class="variable">$copiedHeaders</span>[] = <span class="variable">$header</span>[&#x27;label&#x27;] . &#x27;:&#x27; . //Note no space after this, as per RFC</span></span><br><span class="line"><span class="string">                        str_replace(&#x27;|&#x27;, &#x27;=7C&#x27;, <span class="variable">$this</span>-&gt;DKIM_QP(<span class="variable">$header</span>[&#x27;value&#x27;]));</span></span><br><span class="line"><span class="string">                &#125;</span></span><br><span class="line"><span class="string">                continue;</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string">            //Is this an extra custom header we&#x27;ve been asked to sign?</span></span><br><span class="line"><span class="string">            if (in_array(<span class="variable">$header</span>[&#x27;label&#x27;], <span class="variable">$this</span>-&gt;DKIM_extraHeaders, true)) &#123;</span></span><br><span class="line"><span class="string">                //Find its value in custom headers</span></span><br><span class="line"><span class="string">                foreach (<span class="variable">$this</span>-&gt;CustomHeader as <span class="variable">$customHeader</span>) &#123;</span></span><br><span class="line"><span class="string">                    if (<span class="variable">$customHeader</span>[0] === <span class="variable">$header</span>[&#x27;label&#x27;]) &#123;</span></span><br><span class="line"><span class="string">                        <span class="variable">$headersToSignKeys</span>[] = <span class="variable">$header</span>[&#x27;label&#x27;];</span></span><br><span class="line"><span class="string">                        <span class="variable">$headersToSign</span>[] = <span class="variable">$header</span>[&#x27;label&#x27;] . &#x27;: &#x27; . <span class="variable">$header</span>[&#x27;value&#x27;];</span></span><br><span class="line"><span class="string">                        if (<span class="variable">$this</span>-&gt;DKIM_copyHeaderFields) &#123;</span></span><br><span class="line"><span class="string">                            <span class="variable">$copiedHeaders</span>[] = <span class="variable">$header</span>[&#x27;label&#x27;] . &#x27;:&#x27; . //Note no space after this, as per RFC</span></span><br><span class="line"><span class="string">                                str_replace(&#x27;|&#x27;, &#x27;=7C&#x27;, <span class="variable">$this</span>-&gt;DKIM_QP(<span class="variable">$header</span>[&#x27;value&#x27;]));</span></span><br><span class="line"><span class="string">                        &#125;</span></span><br><span class="line"><span class="string">                        //Skip straight to the next header</span></span><br><span class="line"><span class="string">                        continue 2;</span></span><br><span class="line"><span class="string">                    &#125;</span></span><br><span class="line"><span class="string">                &#125;</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        <span class="variable">$copiedHeaderFields</span> = &#x27;&#x27;;</span></span><br><span class="line"><span class="string">        if (<span class="variable">$this</span>-&gt;DKIM_copyHeaderFields &amp;&amp; count(<span class="variable">$copiedHeaders</span>) &gt; 0) &#123;</span></span><br><span class="line"><span class="string">            //Assemble a DKIM &#x27;z&#x27; tag</span></span><br><span class="line"><span class="string">            <span class="variable">$copiedHeaderFields</span> = &#x27; z=&#x27;;</span></span><br><span class="line"><span class="string">            <span class="variable">$first</span> = true;</span></span><br><span class="line"><span class="string">            foreach (<span class="variable">$copiedHeaders</span> as <span class="variable">$copiedHeader</span>) &#123;</span></span><br><span class="line"><span class="string">                if (!<span class="variable">$first</span>) &#123;</span></span><br><span class="line"><span class="string">                    <span class="variable">$copiedHeaderFields</span> .= static::<span class="variable">$LE</span> . &#x27; |&#x27;;</span></span><br><span class="line"><span class="string">                &#125;</span></span><br><span class="line"><span class="string">                //Fold long values</span></span><br><span class="line"><span class="string">                if (strlen(<span class="variable">$copiedHeader</span>) &gt; self::STD_LINE_LENGTH - 3) &#123;</span></span><br><span class="line"><span class="string">                    <span class="variable">$copiedHeaderFields</span> .= substr(</span></span><br><span class="line"><span class="string">                        chunk_split(<span class="variable">$copiedHeader</span>, self::STD_LINE_LENGTH - 3, static::<span class="variable">$LE</span> . self::FWS),</span></span><br><span class="line"><span class="string">                        0,</span></span><br><span class="line"><span class="string">                        -strlen(static::<span class="variable">$LE</span> . self::FWS)</span></span><br><span class="line"><span class="string">                    );</span></span><br><span class="line"><span class="string">                &#125; else &#123;</span></span><br><span class="line"><span class="string">                    <span class="variable">$copiedHeaderFields</span> .= <span class="variable">$copiedHeader</span>;</span></span><br><span class="line"><span class="string">                &#125;</span></span><br><span class="line"><span class="string">                <span class="variable">$first</span> = false;</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string">            <span class="variable">$copiedHeaderFields</span> .= &#x27;;&#x27; . static::<span class="variable">$LE</span>;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        <span class="variable">$headerKeys</span> = &#x27; h=&#x27; . implode(&#x27;:&#x27;, <span class="variable">$headersToSignKeys</span>) . &#x27;;&#x27; . static::<span class="variable">$LE</span>;</span></span><br><span class="line"><span class="string">        <span class="variable">$headerValues</span> = implode(static::<span class="variable">$LE</span>, <span class="variable">$headersToSign</span>);</span></span><br><span class="line"><span class="string">        <span class="variable">$body</span> = <span class="variable">$this</span>-&gt;DKIM_BodyC(<span class="variable">$body</span>);</span></span><br><span class="line"><span class="string">        <span class="variable">$DKIMb64</span> = base64_encode(pack(&#x27;H*&#x27;, hash(&#x27;sha256&#x27;, <span class="variable">$body</span>))); // Base64 of packed binary SHA-256 hash of body</span></span><br><span class="line"><span class="string">        <span class="variable">$ident</span> = &#x27;&#x27;;</span></span><br><span class="line"><span class="string">        if (&#x27;&#x27; !== <span class="variable">$this</span>-&gt;DKIM_identity) &#123;</span></span><br><span class="line"><span class="string">            <span class="variable">$ident</span> = &#x27; i=&#x27; . <span class="variable">$this</span>-&gt;DKIM_identity . &#x27;;&#x27; . static::<span class="variable">$LE</span>;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">        //The DKIM-Signature header is included in the signature *except for* the value of the `b` tag</span></span><br><span class="line"><span class="string">        //which is appended after calculating the signature</span></span><br><span class="line"><span class="string">        //https://tools.ietf.org/html/rfc6376#section-3.5</span></span><br><span class="line"><span class="string">        <span class="variable">$dkimSignatureHeader</span> = &#x27;DKIM-Signature: v=1;&#x27; .</span></span><br><span class="line"><span class="string">            &#x27; d=&#x27; . <span class="variable">$this</span>-&gt;DKIM_domain . &#x27;;&#x27; .</span></span><br><span class="line"><span class="string">            &#x27; s=&#x27; . <span class="variable">$this</span>-&gt;DKIM_selector . &#x27;;&#x27; . static::<span class="variable">$LE</span> .</span></span><br><span class="line"><span class="string">            &#x27; a=&#x27; . <span class="variable">$DKIMsignatureType</span> . &#x27;;&#x27; .</span></span><br><span class="line"><span class="string">            &#x27; q=&#x27; . <span class="variable">$DKIMquery</span> . &#x27;;&#x27; .</span></span><br><span class="line"><span class="string">            &#x27; t=&#x27; . <span class="variable">$DKIMtime</span> . &#x27;;&#x27; .</span></span><br><span class="line"><span class="string">            &#x27; c=&#x27; . <span class="variable">$DKIMcanonicalization</span> . &#x27;;&#x27; . static::<span class="variable">$LE</span> .</span></span><br><span class="line"><span class="string">            <span class="variable">$headerKeys</span> .</span></span><br><span class="line"><span class="string">            <span class="variable">$ident</span> .</span></span><br><span class="line"><span class="string">            <span class="variable">$copiedHeaderFields</span> .</span></span><br><span class="line"><span class="string">            &#x27; bh=&#x27; . <span class="variable">$DKIMb64</span> . &#x27;;&#x27; . static::<span class="variable">$LE</span> .</span></span><br><span class="line"><span class="string">            &#x27; b=&#x27;;</span></span><br><span class="line"><span class="string">        //Canonicalize the set of headers</span></span><br><span class="line"><span class="string">        <span class="variable">$canonicalizedHeaders</span> = <span class="variable">$this</span>-&gt;DKIM_HeaderC(</span></span><br><span class="line"><span class="string">            <span class="variable">$headerValues</span> . static::<span class="variable">$LE</span> . <span class="variable">$dkimSignatureHeader</span></span></span><br><span class="line"><span class="string">        );</span></span><br><span class="line"><span class="string">        <span class="variable">$signature</span> = <span class="variable">$this</span>-&gt;DKIM_Sign(<span class="variable">$canonicalizedHeaders</span>);</span></span><br><span class="line"><span class="string">        <span class="variable">$signature</span> = trim(chunk_split(<span class="variable">$signature</span>, self::STD_LINE_LENGTH - 3, static::<span class="variable">$LE</span> . self::FWS));</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">        return static::normalizeBreaks(<span class="variable">$dkimSignatureHeader</span> . <span class="variable">$signature</span>);</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Detect if a string contains a line longer than the maximum line length</span></span><br><span class="line"><span class="string">     * allowed by RFC 2822 section 2.1.1.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$str</span></span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return bool</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public static function hasLineLongerThanMax(<span class="variable">$str</span>)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        return (bool) preg_match(&#x27;/^(.&#123;&#x27; . (self::MAX_LINE_LENGTH + strlen(static::<span class="variable">$LE</span>)) . &#x27;,&#125;)/m&#x27;, <span class="variable">$str</span>);</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Allows for public read access to &#x27;to&#x27; property.</span></span><br><span class="line"><span class="string">     * Before the send() call, queued addresses (i.e. with IDN) are not yet included.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return array</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function getToAddresses()</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        return <span class="variable">$this</span>-&gt;to;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Allows for public read access to &#x27;cc&#x27; property.</span></span><br><span class="line"><span class="string">     * Before the send() call, queued addresses (i.e. with IDN) are not yet included.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return array</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function getCcAddresses()</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        return <span class="variable">$this</span>-&gt;cc;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Allows for public read access to &#x27;bcc&#x27; property.</span></span><br><span class="line"><span class="string">     * Before the send() call, queued addresses (i.e. with IDN) are not yet included.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return array</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function getBccAddresses()</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        return <span class="variable">$this</span>-&gt;bcc;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Allows for public read access to &#x27;ReplyTo&#x27; property.</span></span><br><span class="line"><span class="string">     * Before the send() call, queued addresses (i.e. with IDN) are not yet included.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return array</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function getReplyToAddresses()</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        return <span class="variable">$this</span>-&gt;ReplyTo;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Allows for public read access to &#x27;all_recipients&#x27; property.</span></span><br><span class="line"><span class="string">     * Before the send() call, queued addresses (i.e. with IDN) are not yet included.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return array</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function getAllRecipientAddresses()</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        return <span class="variable">$this</span>-&gt;all_recipients;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Perform a callback.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @param bool   <span class="variable">$isSent</span></span></span><br><span class="line"><span class="string">     * @param array  <span class="variable">$to</span></span></span><br><span class="line"><span class="string">     * @param array  <span class="variable">$cc</span></span></span><br><span class="line"><span class="string">     * @param array  <span class="variable">$bcc</span></span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$subject</span></span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$body</span></span></span><br><span class="line"><span class="string">     * @param string <span class="variable">$from</span></span></span><br><span class="line"><span class="string">     * @param array  <span class="variable">$extra</span></span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    protected function doCallback(<span class="variable">$isSent</span>, <span class="variable">$to</span>, <span class="variable">$cc</span>, <span class="variable">$bcc</span>, <span class="variable">$subject</span>, <span class="variable">$body</span>, <span class="variable">$from</span>, <span class="variable">$extra</span>)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        if (!empty(<span class="variable">$this</span>-&gt;action_function) &amp;&amp; is_callable(<span class="variable">$this</span>-&gt;action_function)) &#123;</span></span><br><span class="line"><span class="string">            call_user_func(<span class="variable">$this</span>-&gt;action_function, <span class="variable">$isSent</span>, <span class="variable">$to</span>, <span class="variable">$cc</span>, <span class="variable">$bcc</span>, <span class="variable">$subject</span>, <span class="variable">$body</span>, <span class="variable">$from</span>, <span class="variable">$extra</span>);</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Get the OAuth instance.</span></span><br><span class="line"><span class="string">     *</span></span><br><span class="line"><span class="string">     * @return OAuth</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function getOAuth()</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        return <span class="variable">$this</span>-&gt;oauth;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    /**</span></span><br><span class="line"><span class="string">     * Set an OAuth instance.</span></span><br><span class="line"><span class="string">     */</span></span><br><span class="line"><span class="string">    public function setOAuth(OAuth <span class="variable">$oauth</span>)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        <span class="variable">$this</span>-&gt;oauth = <span class="variable">$oauth</span>;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string">&#125;</span></span><br><span class="line"><span class="string"></span></span><br></pre></td></tr></table></figure>
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="http://huangxiaochang.gitee.io/ahuang_blog">Ahuang</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="http://huangxiaochang.gitee.io/ahuang_blog/2021/04/12/023/">http://huangxiaochang.gitee.io/ahuang_blog/2021/04/12/023/</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="http://huangxiaochang.gitee.io/ahuang_blog" target="_blank">Ahuang'Blog</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/ahuang_blog/tags/%E9%82%AE%E4%BB%B6%E5%8F%91%E9%80%81/">邮件发送</a><a class="post-meta__tags" href="/ahuang_blog/tags/PHPMailer/">PHPMailer</a></div><div class="post_share"></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/ahuang_blog/2021/05/06/024/" title="高性能配置文件服务Yaconf"><img class="cover" src="https://fastly.jsdelivr.net/gh/jerryc127/CDN@latest/cover/default_bg.png" onerror="onerror=null;src='/ahuang_blog/img/404.jpg'" alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">高性能配置文件服务Yaconf</div></div></a></div><div class="next-post pull-right"><a href="/ahuang_blog/2020/10/12/022/" title="关于三级分销系统统计所有下级"><img class="cover" src="https://fastly.jsdelivr.net/gh/jerryc127/CDN@latest/cover/default_bg.png" onerror="onerror=null;src='/ahuang_blog/img/404.jpg'" alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">关于三级分销系统统计所有下级</div></div></a></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="/ahuang_blog/img/Misaka.jpg" onerror="this.onerror=null;this.src='/ahuang_blog/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">Ahuang</div><div class="author-info__description">Everything can be expected in the future</div></div><div class="card-info-data site-data is-center"><a href="/ahuang_blog/archives/"><div class="headline">文章</div><div class="length-num">51</div></a><a href="/ahuang_blog/tags/"><div class="headline">标签</div><div class="length-num">35</div></a><a href="/ahuang_blog/categories/"><div class="headline">分类</div><div class="length-num">8</div></a></div><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/changad" target="_blank" title="Github"><i class="fab fa-github"></i></a><a class="social-icon" href="mailto:136081905@qq.com" target="_blank" title="Email"><i class="fas fa-envelope"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn fa-shake"></i><span>公告</span></div><div class="announcement_content">快乐每一天！！！</div></div><div class="sticky_layout"><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/ahuang_blog/2022/04/24/051/" title="项目中一些ThinkPhp的使用小技巧">项目中一些ThinkPhp的使用小技巧</a><time datetime="2022-04-24T10:43:22.000Z" title="发表于 2022-04-24 18:43:22">2022-04-24</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/ahuang_blog/2022/04/08/050/" title="Sql查询排名">Sql查询排名</a><time datetime="2022-04-08T08:24:16.000Z" title="发表于 2022-04-08 16:24:16">2022-04-08</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/ahuang_blog/2022/03/06/049/" title="ThinkPhp的跨域问题">ThinkPhp的跨域问题</a><time datetime="2022-03-06T04:40:38.000Z" title="发表于 2022-03-06 12:40:38">2022-03-06</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/ahuang_blog/2021/11/13/048/" title="Nginx关于Socket的配置">Nginx关于Socket的配置</a><time datetime="2021-11-13T07:02:15.000Z" title="发表于 2021-11-13 15:02:15">2021-11-13</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/ahuang_blog/2021/10/28/047/" title="Node.js之Express关于socket.io的使用">Node.js之Express关于socket.io的使用</a><time datetime="2021-10-28T04:36:17.000Z" title="发表于 2021-10-28 12:36:17">2021-10-28</time></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2018 - 2023 By Ahuang</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div><div class="footer_custom_text">Everything can be expected in the future!</div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button id="go-up" type="button" title="回到顶部"><span class="scroll-percent"></span><i class="fas fa-arrow-up"></i></button></div></div><div id="local-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">搜索</span><span id="loading-status"></span><button class="search-close-button"><i class="fas fa-times"></i></button></nav><div class="is-center" id="loading-database"><i class="fas fa-spinner fa-pulse"></i><span>  数据库加载中</span></div><div class="search-wrap"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div><hr/><div id="local-search-results"></div></div></div><div id="search-mask"></div></div><div><script src="/ahuang_blog/js/utils.js"></script><script src="/ahuang_blog/js/main.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.umd.min.js"></script><script src="/ahuang_blog/js/search/local-search.js"></script><div class="js-pjax"></div><script src="https://cdn.bootcss.com/canvas-nest.js/1.0.0/canvas-nest.min.js"></script><script async src="https://cdn.jsdelivr.net/npm/js-heo@1.0.11/categoryBar/categoryBar.js"></script><script src="/blog/js/categoryBar.js"><script defer="defer" id="fluttering_ribbon" mobile="true" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/dist/canvas-fluttering-ribbon.min.js"></script><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/dist/activate-power-mode.min.js"></script><script>POWERMODE.colorful = true;
POWERMODE.shake = true;
POWERMODE.mobile = true;
document.body.addEventListener('input', POWERMODE);
</script><script id="click-heart" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/dist/click-heart.min.js" async="async" mobile="true"></script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div><!-- hexo injector body_end start --><script data-pjax>
  function butterfly_clock_injector_config(){
    var parent_div_git = document.getElementsByClassName('sticky_layout')[0];
    var item_html = '<div class="card-widget card-clock"><div class="card-glass"><div class="card-background"><div class="card-content"><div id="hexo_electric_clock"><img class="entered loading" id="card-clock-loading" src="/ahuang_blog/img/loading.gif" style="height: 120px; width: 100%;" data-ll-status="loading"/></div></div></div></div></div>';
    console.log('已挂载butterfly_clock')
    parent_div_git.insertAdjacentHTML("afterbegin",item_html)
    }
  var elist = 'null'.split(',');
  var cpage = location.pathname;
  var epage = 'all';
  var flag = 0;

  for (var i=0;i<elist.length;i++){
    if (cpage.includes(elist[i])){
      flag++;
    }
  }

  if ((epage ==='all')&&(flag == 0)){
    butterfly_clock_injector_config();
  }
  else if (epage === cpage){
    butterfly_clock_injector_config();
  }
  </script><script src="https://pv.sohu.com/cityjson?ie=utf-8"></script><script data-pjax src="https://npm.elemecdn.com/hexo-butterfly-clock/lib/clock.min.js"></script><!-- hexo injector body_end end --></body></html>